@@ -109,11 +109,17 @@ def test_chartpress_run(git_repo, capfd, use_chart_version):
109
109
# already.
110
110
assert "Updating" not in out
111
111
112
+ # Run again, but from a clean repo (versions in git don't match tag)
113
+ # Should produce the same result
114
+ git_repo .git .checkout (tag , "--" , "testchart/values.yaml" )
115
+ out = _capture_output (["--skip-build" ], capfd )
116
+ assert f"Updating testchart/values.yaml: image: testchart/testimage:{ tag } \n " in out
117
+
112
118
# verify usage of --long
113
119
out = _capture_output (["--skip-build" , "--long" ], capfd )
114
- assert f"Updating testchart/Chart.yaml: version: { tag } .git.0 .h{ sha } " in out
120
+ assert f"Updating testchart/Chart.yaml: version: { tag } .git.1 .h{ sha } " in out
115
121
assert (
116
- f"Updating testchart/values.yaml: image: testchart/testimage:{ tag } .git.0 .h{ sha } "
122
+ f"Updating testchart/values.yaml: image: testchart/testimage:{ tag } .git.1 .h{ sha } "
117
123
in out
118
124
)
119
125
@@ -198,7 +204,7 @@ def test_chartpress_run(git_repo, capfd, use_chart_version):
198
204
# verify output of --publish-chart
199
205
assert "'gh-pages' set up to track" in out
200
206
assert "Successfully packaged chart and saved it to:" in out
201
- assert f"/testchart-{ tag } .git.1 .h{ sha } .tgz" in out
207
+ assert f"/testchart-{ tag } .git.2 .h{ sha } .tgz" in out
202
208
assert "Skipping chart publishing" not in out
203
209
204
210
# checkout gh-pages
@@ -214,7 +220,7 @@ def test_chartpress_run(git_repo, capfd, use_chart_version):
214
220
assert "version: 1.2.1" in index_yaml
215
221
assert "version: 1.2.2" in index_yaml
216
222
assert f"version: { tag } " in index_yaml
217
- assert f"version: { tag } .git.1 .h{ sha } " in index_yaml
223
+ assert f"version: { tag } .git.2 .h{ sha } " in index_yaml
218
224
219
225
# return to main
220
226
git_repo .git .checkout ("main" )
@@ -341,7 +347,7 @@ def test_dev_tag(git_repo_dev_tag, capfd):
341
347
with open ("testchart/Chart.yaml" ) as f :
342
348
chart = yaml .load (f )
343
349
344
- tag = f"2.0.0-dev.git.1 .h{ sha } "
350
+ tag = f"2.0.0-dev.git.3 .h{ sha } "
345
351
assert chart ["version" ] == tag
346
352
check_version (tag )
347
353
@@ -353,7 +359,7 @@ def test_backport_branch(git_repo_backport_branch, capfd):
353
359
with open ("testchart/Chart.yaml" ) as f :
354
360
chart = yaml .load (f )
355
361
356
- tag = f"1.0.1-{ PRERELEASE_PREFIX } .1 .h{ sha } "
362
+ tag = f"1.0.1-{ PRERELEASE_PREFIX } .3 .h{ sha } "
357
363
assert chart ["version" ] == tag
358
364
check_version (tag )
359
365
0 commit comments