Skip to content

Commit f4c77a4

Browse files
authored
Merge pull request #1145 from projectsyn/renovate/click-8.x
Update dependency click to v8.2.0
2 parents a08fb5c + d64b4c2 commit f4c77a4

File tree

7 files changed

+21
-14
lines changed

7 files changed

+21
-14
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,4 +162,9 @@ jobs:
162162
- name: Build image
163163
run: make docker
164164
- name: Run image
165-
run: docker run docker.io/projectsyn/commodore:test
165+
run: |
166+
docker run docker.io/projectsyn/commodore:test || exit_code=$?
167+
if [ "$exit_code" -ne 2 ]; then
168+
echo "Unexpected exit code $exit_code, expected 2"
169+
exit $exit_code
170+
fi

poetry.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ python = ">=3.10, <3.13"
3131
boto3 = "^1.26.145"
3232
botocore="^1.29.145"
3333
kapitan = "0.34.6"
34-
click = "8.1.8"
34+
click = "8.2.0"
3535
gitpython = "3.1.44"
3636
requests = "2.32.3"
3737
url-normalize = "2.2.1"

tests/test_cli.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ def test_runas_module():
1010
Can this package be run as a Python module?
1111
"""
1212
exit_status = call("python -m commodore", shell=True)
13-
assert exit_status == 0
13+
# click 8.2 changed exit code for `no_args_is_help` from 0 to 2
14+
assert exit_status == 2
1415

1516

1617
def test_entrypoint():

tests/test_cli_catalog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def test_catalog_compile_cli(
138138
if exitcode == 1:
139139
assert (
140140
"Cannot push changes when local global or tenant repo override is specified"
141-
in result.stdout
141+
in result.stderr
142142
)
143143
if "push" in expected and not expected.get("fetch_dependencies", True):
144144
assert (

tests/test_cli_oidc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ def test_commodore_fetch_token(
4242
result = cli_runner(["fetch-token"] + args)
4343

4444
assert result.exit_code == exitcode
45-
assert result.stdout == output
45+
out = result.stdout if result.exit_code == 0 else result.stderr
46+
assert out == output
4647

4748

4849
@pytest.mark.parametrize(

tests/test_component_template.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,7 @@ def test_component_update_no_cruft_json(tmp_path: P, cli_runner: RunnerFunc):
11071107
result = cli_runner(["component", "update", str(component_path)])
11081108
assert result.exit_code == 1
11091109
assert (
1110-
result.stdout
1110+
result.stderr
11111111
== "Error: Provided component path doesn't have `.cruft.json`, can't update.\n"
11121112
)
11131113

@@ -1171,7 +1171,7 @@ def test_component_update_test_cases(
11711171
assert result.exit_code == (0 if len(updated_cases) > 0 else 1)
11721172
if len(updated_cases) == 0:
11731173
assert (
1174-
result.stdout
1174+
result.stderr
11751175
== "Error: Component template doesn't support removing all test cases.\n"
11761176
)
11771177
final_cases = orig_cases
@@ -1745,9 +1745,9 @@ def test_component_update_raises_on_merge_conflict(
17451745
result = cli_runner(["component", "update", "--lib", str(component_path)])
17461746

17471747
assert result.exit_code == 1
1748-
stdout_lines = result.stdout.strip().split("\n")
1748+
stderr_lines = result.stderr.strip().split("\n")
17491749
assert (
1750-
stdout_lines[-1]
1750+
stderr_lines[-1]
17511751
== "Error: Can't commit template changes: merge error in "
17521752
+ "'lib/test-component.libsonnet'. Please resolve conflicts and commit manually."
17531753
)

0 commit comments

Comments
 (0)