Skip to content

Commit

Permalink
sanity: Uses k8s_test_harness utils
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 committed Jul 22, 2024
1 parent 4dfdbb1 commit 81b72d6
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions tests/sanity/test_rock.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import subprocess

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


def _test_sanity(image_version):
Expand All @@ -15,12 +15,8 @@ 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


def test_cluster_autoscaler_1_24_0():
Expand Down

0 comments on commit 81b72d6

Please sign in to comment.