From 1903d82913f6b16519b8d6e4c2a7c2eb1b31bf15 Mon Sep 17 00:00:00 2001 From: James Falcon Date: Mon, 7 Oct 2024 14:34:32 -0500 Subject: [PATCH] test: actually use devel release and verify_clean_boot enhancements --- .github/workflows/integration.yml | 2 +- tests/integration_tests/util.py | 27 +++++++-------------------- 2 files changed, 8 insertions(+), 21 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index e97bcce9cc1..269800afb81 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -68,4 +68,4 @@ jobs: echo "[lxd]" > /home/$USER/.config/pycloudlib.toml - name: Run integration Tests run: | - CLOUD_INIT_CLOUD_INIT_SOURCE="$(ls ${{ runner.temp }}/cloud-init*.deb)" tox -e integration-tests-ci -- --color=yes tests/integration_tests/ + CLOUD_INIT_CLOUD_INIT_SOURCE="$(ls ${{ runner.temp }}/cloud-init*.deb)" CLOUD_INIT_OS_IMAGE=oracular tox -e integration-tests-ci -- --color=yes tests/integration_tests/ diff --git a/tests/integration_tests/util.py b/tests/integration_tests/util.py index 96f5b2426bb..8121c7600ec 100644 --- a/tests/integration_tests/util.py +++ b/tests/integration_tests/util.py @@ -298,6 +298,9 @@ def _verify_clean_boot( message += _format_found( "Required warnings not found", list(required_warnings_not_found) ) + message += _format_found( + "Found unexpected deprecations", list(unexpected_deprecations) + ) message += _format_found( "Required deprecations not found", list(required_deprecations_not_found), @@ -364,29 +367,13 @@ def _verify_clean_boot( f"{out.stdout}\nstderr:\n{out.stderr}" ) else: - # we know that we should have a return code of 2 + # Look at the commit history before making changes here. + # Behavior on Jenkins, GH CI, and local runs must be considered + # for all series. out = instance.execute("cloud-init status --long") rc = 2 - # CI on main doesn't patch out this behavior so despite running on - # old releases it behaves as tip of main does - # - # GITHUB_BASE_REF is not defined if - # 1. The event that triggers a workflow run on GH CI is not - # pull_request or pull_request_target. - # 2. The integration tests aren't run on GH but on Jenkins or locally - # on a developer's machine. - # - # On Jenkins, rc should be 0. But, on GH CI on runs that are not - # not triggered from a pr event, we still want rc 2. if CURRENT_RELEASE < NOBLE: - if os.environ.get("ON_JENKINS"): - # We are on Jenkins testing against full packages - # Old releases return 0 for backwards compatibility - rc = 0 - elif os.environ.get("GITHUB_ACTION"): - # On GH actions, integrations tests run on LXD without quilt - # patches - rc = 2 + rc = 0 assert rc == out.return_code, ( f"Unexpected return code from `cloud-init status`. " f"Expected rc={rc}, received rc={out.return_code}\nstdout: "