Skip to content

Commit

Permalink
Collect image versions from the local file system
Browse files Browse the repository at this point in the history
  • Loading branch information
addyess committed Dec 2, 2024
1 parent a2cc206 commit 6fb5e0b
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tests/sanity/test_rock.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,22 @@
# Copyright 2024 Canonical, Ltd.
#

from pathlib import Path

import pytest
import yaml
from k8s_test_harness.util import docker_util, env_util

TEST_PATH = Path(__file__)
REPO_PATH = TEST_PATH.parent.parent.parent


def _image_versions():
all_rockcrafts = REPO_PATH.glob("**/rockcraft.yaml")
yamls = [yaml.safe_load(rock.read_bytes()) for rock in all_rockcrafts]
return [rock["version"] for rock in yamls]

@pytest.mark.parametrize("image_version", ["1.11.1", "1.11.3"])
@pytest.mark.parametrize("image_version", _image_versions())
def test_sanity(image_version):
rock = env_util.get_build_meta_info_for_rock_version(
"coredns", image_version, "amd64"
Expand Down

0 comments on commit 6fb5e0b

Please sign in to comment.