Skip to content

Commit

Permalink
Fix Pytest Tests failing on PRs updating src (nebari-dev#2790)
Browse files Browse the repository at this point in the history
  • Loading branch information
joneszc authored Oct 23, 2024
2 parents a234597 + c832a39 commit 42e0b15
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions tests/tests_unit/test_cli_validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,26 +114,20 @@ def test_cli_validate_from_env():
["validate", "--config", tmp_file.resolve()],
env={"NEBARI_SECRET__amazon_web_services__kubernetes_version": "1.20"},
)
try:
assert 0 == valid_result.exit_code
assert not valid_result.exception
assert "Successfully validated configuration" in valid_result.stdout
except AssertionError:
print(valid_result.stdout)
raise

assert 0 == valid_result.exit_code
assert not valid_result.exception
assert "Successfully validated configuration" in valid_result.stdout

invalid_result = runner.invoke(
app,
["validate", "--config", tmp_file.resolve()],
env={"NEBARI_SECRET__amazon_web_services__kubernetes_version": "1.0"},
)
try:
assert 1 == invalid_result.exit_code
assert invalid_result.exception
assert "Invalid `kubernetes-version`" in invalid_result.stdout
except AssertionError:
print(invalid_result.stdout)
raise

assert 1 == invalid_result.exit_code
assert invalid_result.exception
assert "Invalid `kubernetes-version`" in invalid_result.stdout


@pytest.mark.parametrize(
Expand Down

0 comments on commit 42e0b15

Please sign in to comment.