From 36b86dff80d99971ff781be15d93d17e47e0fdb7 Mon Sep 17 00:00:00 2001 From: Cleber Rosa Date: Wed, 27 Dec 2023 06:09:16 -0500 Subject: [PATCH 1/5] Drop Cirrus-CI references All Cirrus-CI jobs have been moved to GitHub Actions in 1103abd4b. Signed-off-by: Cleber Rosa --- docs/source/quickstart/index.rst | 4 ---- selftests/pre_release/jobs/pre_release.py | 6 +----- selftests/pre_release/tests/cirrusci.py | 15 --------------- 3 files changed, 1 insertion(+), 24 deletions(-) delete mode 100644 selftests/pre_release/tests/cirrusci.py diff --git a/docs/source/quickstart/index.rst b/docs/source/quickstart/index.rst index 612189b6a4..a5293eba70 100644 --- a/docs/source/quickstart/index.rst +++ b/docs/source/quickstart/index.rst @@ -245,10 +245,6 @@ Build and Quality Status :target: https://copr.fedorainfracloud.org/coprs/g/avocado/avocado-latest/package/python-avocado/ :alt: Copr build -.. image:: https://api.cirrus-ci.com/github/avocado-framework/avocado.svg - :target: https://cirrus-ci.com/github/avocado-framework/avocado - :alt: Basic checks on Cirrus CI - .. image:: https://api.codeclimate.com/v1/badges/03f506164e1d19f95480/maintainability :target: https://codeclimate.com/github/avocado-framework/avocado/maintainability :alt: Code Climate Maintainability diff --git a/selftests/pre_release/jobs/pre_release.py b/selftests/pre_release/jobs/pre_release.py index 0ba0c22354..97c089da9f 100755 --- a/selftests/pre_release/jobs/pre_release.py +++ b/selftests/pre_release/jobs/pre_release.py @@ -9,10 +9,6 @@ ROOT_DIR = os.path.dirname(os.path.dirname(os.path.dirname(THIS_DIR))) TESTS_DIR = os.path.join(os.path.dirname(THIS_DIR), "tests") -cirrus_ci = { - "resolver.references": [os.path.join(TESTS_DIR, "cirrusci.py")], -} - parallel_1 = { "resolver.references": [ os.path.join("selftests", "unit"), @@ -31,6 +27,6 @@ if __name__ == "__main__": os.chdir(ROOT_DIR) config = {"job.output.testlogs.statuses": ["FAIL", "ERROR", "INTERRUPT"]} - with Job.from_config(config, [cirrus_ci, parallel_1, vmimage]) as j: + with Job.from_config(config, [parallel_1, vmimage]) as j: os.environ["AVOCADO_CHECK_LEVEL"] = "3" sys.exit(j.run()) diff --git a/selftests/pre_release/tests/cirrusci.py b/selftests/pre_release/tests/cirrusci.py deleted file mode 100644 index 4b7b71459f..0000000000 --- a/selftests/pre_release/tests/cirrusci.py +++ /dev/null @@ -1,15 +0,0 @@ -import json -import unittest - -from avocado.utils import download - - -class CirrusCI(unittest.TestCase): - def test(self): - url = "https://api.cirrus-ci.com/github/avocado-framework/avocado.json" - http_response = download.url_open(url) - self.assertEqual(http_response.code, 200) - content = http_response.read() - data = json.loads(content) - self.assertIn("status", data) - self.assertEqual(data["status"], "passing") From 84ba07e3f21f19525303c98a8bddb2df431f98eb Mon Sep 17 00:00:00 2001 From: Cleber Rosa Date: Wed, 27 Dec 2023 09:29:11 -0500 Subject: [PATCH 2/5] Docs: remove Falco reference Falco dropped all Python based tests, migrating to a different repo. Reference: https://github.com/falcosecurity/falco/pull/2716 Signed-off-by: Cleber Rosa --- docs/source/misc/index.rst | 9 --------- 1 file changed, 9 deletions(-) diff --git a/docs/source/misc/index.rst b/docs/source/misc/index.rst index 4c83631e87..4d4ea23603 100644 --- a/docs/source/misc/index.rst +++ b/docs/source/misc/index.rst @@ -49,15 +49,6 @@ It uses Avocado in its `ftest `__ test suite. -Falco -~~~~~ - -`Falco `__, the cloud-native runtime security -project, is the de facto Kubernetes threat detection engine. - -It uses Avocado in its `regression test suite -`__. - RUDDER ~~~~~~ From 28a13ca293b02c4274dc718d891d6366a4fbeba3 Mon Sep 17 00:00:00 2001 From: Cleber Rosa Date: Wed, 27 Dec 2023 09:56:57 -0500 Subject: [PATCH 3/5] Drop readthedocs.py custom test We now have a readthedocs.org hook active, and the badge already covers the status of the docs being built. Signed-off-by: Cleber Rosa --- examples/testplans/release/pre.json | 3 -- selftests/pre_release/tests/readthedocs.py | 34 ---------------------- 2 files changed, 37 deletions(-) delete mode 100644 selftests/pre_release/tests/readthedocs.py diff --git a/examples/testplans/release/pre.json b/examples/testplans/release/pre.json index 213298e5f2..5b960feae6 100644 --- a/examples/testplans/release/pre.json +++ b/examples/testplans/release/pre.json @@ -7,9 +7,6 @@ {"name": "Check status of master branch", "description": "Navigate to:\n\n https://github.com/avocado-framework/avocado#build-and-quality-status\n\nand make sure that all build and quality services report good indicators"}, - {"name": "Set the readthedocs.org token and check it", - "description": "Generate and export the content of a token (from https://readthedocs.org/accounts/tokens/) as the AVOCADO_READTHEDOCS_TOKEN environment variable. For this step you have to be admin of avocado-framework project on readthedocs.org: Run locally selftests/pre_release/tests/readthedocs.py and make sure it is passing."}, - {"name": "Run GitHub Action 'Pre-release tests'", "description": "Run the GitHub Action 'Pre-release tests' on the master branch at https://github.com/avocado-framework/avocado/actions/workflows/prerelease.yml and check all the tests pass. Make at least a quick visual check to the logs."}, diff --git a/selftests/pre_release/tests/readthedocs.py b/selftests/pre_release/tests/readthedocs.py deleted file mode 100644 index d679998b12..0000000000 --- a/selftests/pre_release/tests/readthedocs.py +++ /dev/null @@ -1,34 +0,0 @@ -import json -import os -import urllib.request - -from avocado import Test - - -class ReadtheDocs(Test): - def test(self): - token_from_env = os.environ.get("AVOCADO_READTHEDOCS_TOKEN", None) - token = self.params.get("token", default=token_from_env) - if not token: - self.fail( - "Please provide a readthedocs.org token either " - 'via the "token" parameter or the ' - '"AVOCADO_READTHEDOCS_TOKEN" environment variable' - ) - - headers = { - "Authorization": f"Token {token}", - # readthedocs.org throws a 403 without User-Agent header - "User-Agent": "", - } - - url = ( - "https://readthedocs.org/api/v3/projects/avocado-framework/" - "builds/?limit=1&?version=latest" - ) - - http_request = urllib.request.Request(url, headers=headers) - http_response = urllib.request.urlopen(http_request) - content = http_response.read() - data = json.loads(content) - self.assertTrue(data["results"][0]["success"]) From 6b69b910c5099f3a4e19c2d9aab7a6bf8a4fa979 Mon Sep 17 00:00:00 2001 From: Cleber Rosa Date: Wed, 27 Dec 2023 11:09:50 -0500 Subject: [PATCH 4/5] avocado/utils/vmimage.py: Fedora 36 is now archived Fedora 36 is now available under the archive location, so let's update the code that alternates between locations. Signed-off-by: Cleber Rosa --- avocado/utils/vmimage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/avocado/utils/vmimage.py b/avocado/utils/vmimage.py index 1eda368e77..8ce263f0f1 100644 --- a/avocado/utils/vmimage.py +++ b/avocado/utils/vmimage.py @@ -212,7 +212,7 @@ def get_image_url(self): else: cloud = "CloudImages" - if self.url_old_images and int(self.version) <= 35: + if self.url_old_images and int(self.version) <= 36: self.url_versions = self.url_old_images self.url_images = self.url_versions + "{version}/" + cloud + "/{arch}/images/" From 426dd6e089c7315e7e26996481563b654d02fad3 Mon Sep 17 00:00:00 2001 From: Cleber Rosa Date: Wed, 27 Dec 2023 11:41:52 -0500 Subject: [PATCH 5/5] vmimage: widen the scope of tested Fedora releases Let's include one archived (36), and all active Fedora releases in the tested / advertised as supported versions. Signed-off-by: Cleber Rosa --- .../pre_release/tests/vmimage.py.data/variants.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/selftests/pre_release/tests/vmimage.py.data/variants.yml b/selftests/pre_release/tests/vmimage.py.data/variants.yml index 0baa247c39..1166a60cde 100644 --- a/selftests/pre_release/tests/vmimage.py.data/variants.yml +++ b/selftests/pre_release/tests/vmimage.py.data/variants.yml @@ -50,12 +50,14 @@ distro: !mux !filter-out : /run/architectures/ppc !filter-out : /run/architectures/ppc64 version: !mux - 34: - version: 34 - 35: - version: 35 36: version: 36 + 37: + version: 37 + 38: + version: 38 + 39: + version: 39 ubuntu: name: ubuntu !filter-out : /run/architectures/arm