ci: ensure all tests adjust based on matrix.ubuntu_version

This commit is contained in:
Erik Sundell
2021-10-20 11:20:19 +02:00
parent 3596039bbd
commit 4a8308b0db
2 changed files with 14 additions and 2 deletions

View File

@@ -123,6 +123,12 @@ jobs:
pytest --verbose --maxfail=2 --color=yes --durations=10 --capture=no \
integration-tests/test_bootstrap.py
timeout-minutes: 15
env:
# integration-tests/test_bootstrap.py will build and start containers
# based on this environment variable. This is similar to how
# .github/integration-test.py build-image can take a --build-arg
# setting the ubuntu_version.
UBUNTU_VERSION: ${{ matrix.ubuntu_version }}
- name: Run basic tests
run: |

View File

@@ -117,7 +117,10 @@ def test_ubuntu_too_old():
def test_inside_no_systemd_docker():
output = run_bootstrap_after_preparing_container("plain-docker-test", "ubuntu:18.04")
output = run_bootstrap_after_preparing_container(
"plain-docker-test",
f"ubuntu:{os.getenv('UBUNTU_VERSION', '20.04')}",
)
assert "Systemd is required to run TLJH" in output.stdout
assert output.returncode == 1
@@ -150,7 +153,10 @@ def verify_progress_page(expected_status_code, timeout):
def test_progress_page():
with concurrent.futures.ThreadPoolExecutor() as executor:
installer = executor.submit(
run_bootstrap_after_preparing_container, "progress-page", "ubuntu:18.04", True
run_bootstrap_after_preparing_container,
"progress-page",
f"ubuntu:{os.getenv('UBUNTU_VERSION', '20.04')}",
True
)
# Check if progress page started