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 d4151a3
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests/sanity/test_rock.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,23 @@
# 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 d4151a3

Please sign in to comment.