[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 5/9] tests/avocado: simplify parameters on fetch_asset with na
|
From: |
Cleber Rosa |
|
Subject: |
[PATCH v2 5/9] tests/avocado: simplify parameters on fetch_asset with name only |
|
Date: |
Tue, 6 Aug 2024 13:31:15 -0400 |
When an asset has a single location, it's possible to use that
URI as the name of the asset.
Reference:
https://avocado-framework.readthedocs.io/en/103.0/api/utils/avocado.utils.html#avocado.utils.asset.Asset
Reference:
https://avocado-framework.readthedocs.io/en/103.0/api/test/avocado.html#avocado.Test.fetch_asset
Signed-off-by: Cleber Rosa <crosa@redhat.com>
---
tests/avocado/kvm_xen_guest.py | 2 +-
tests/avocado/netdev-ethtool.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/avocado/kvm_xen_guest.py b/tests/avocado/kvm_xen_guest.py
index f8cb458d5d..b6ee1ff752 100644
--- a/tests/avocado/kvm_xen_guest.py
+++ b/tests/avocado/kvm_xen_guest.py
@@ -40,7 +40,7 @@ def get_asset(self, name, sha1):
url = base_url + name
# use explicit name rather than failing to neatly parse the
# URL into a unique one
- return self.fetch_asset(name=name, locations=(url), asset_hash=sha1)
+ return self.fetch_asset(name=url, asset_hash=sha1)
def common_vm_setup(self):
# We also catch lack of KVM_XEN support if we fail to launch
diff --git a/tests/avocado/netdev-ethtool.py b/tests/avocado/netdev-ethtool.py
index 5f33288f81..7345ded28c 100644
--- a/tests/avocado/netdev-ethtool.py
+++ b/tests/avocado/netdev-ethtool.py
@@ -27,7 +27,7 @@ def get_asset(self, name, sha1):
url = base_url + name
# use explicit name rather than failing to neatly parse the
# URL into a unique one
- return self.fetch_asset(name=name, locations=(url), asset_hash=sha1)
+ return self.fetch_asset(name=url, asset_hash=sha1)
def common_test_code(self, netdev, extra_args=None):
--
2.45.2
- [PATCH v2 0/9] Bump Avocado to 103.0 LTS and update tests for compatibility and new features, Cleber Rosa, 2024/08/06
- [PATCH v2 1/9] Bump avocado to 103.0, Cleber Rosa, 2024/08/06
- [PATCH v2 2/9] tests/avocado: apply proper skipUnless decorator, Cleber Rosa, 2024/08/06
- [PATCH v2 3/9] tests/avocado: add cdrom permission related tests, Cleber Rosa, 2024/08/06
- [PATCH v2 4/9] tests/avocado: machine aarch64: standardize location and RO access, Cleber Rosa, 2024/08/06
- [PATCH v2 5/9] tests/avocado: simplify parameters on fetch_asset with name only,
Cleber Rosa <=
- [PATCH v2 7/9] tests/avocado/tuxrun_baselines.py: use Avocado's zstd support, Cleber Rosa, 2024/08/06
- [PATCH v2 6/9] tests/avocado/boot_xen.py: fetch kernel during test setUp(), Cleber Rosa, 2024/08/06
- [PATCH v2 8/9] tests/avocado/machine_aarch64_sbsaref.py: allow for rw usage of image, Cleber Rosa, 2024/08/06
- [PATCH v2 9/9] Avocado tests: allow for parallel execution of tests, Cleber Rosa, 2024/08/06