Skip to content

Commit

Permalink
sanity: Uses k8s_test_harness utils (#15)
Browse files Browse the repository at this point in the history
The k8s_test_harness contains commonly used util functions. This
will simplify the tests.
  • Loading branch information
claudiubelu authored Jul 22, 2024
1 parent 45dbc38 commit ab72db4
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions tests/sanity/test_rock.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
# Copyright 2024 Canonical, Ltd.
#

import subprocess

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


@pytest.mark.parametrize("image_version", ("1.24.0", "1.27.2"))
Expand All @@ -17,9 +15,5 @@ def test_sanity(image_version):

entrypoint = "/cluster-autoscaler"
# assert we have the expected files
docker_run = subprocess.run(
["docker", "run", "--rm", "--entrypoint", entrypoint, image, "--help"],
capture_output=True,
text=True,
)
assert "Usage of /cluster-autoscaler:" in docker_run.stderr
process = docker_util.run_in_docker(image, [entrypoint, "--help"])
assert "Usage of /cluster-autoscaler:" in process.stderr

0 comments on commit ab72db4

Please sign in to comment.