Skip to content

Commit 7f5a5b4

Browse files
committed
calling CName constructor with the commit parameter
1 parent f085996 commit 7f5a5b4

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

src/gardenlinux/github/release_notes/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def download_all_metadata_files(version, commitish, s3_bucket_name):
6464
commitish_short = commitish[:8]
6565

6666
for flavor in flavors:
67-
cname = CName(flavor[1], flavor[0], "{0}-{1}".format(version, commitish_short))
67+
cname = CName(flavor[1], flavor[0], commitish_short)
6868
LOGGER.debug(f"{flavor=} {version=} {commitish=}")
6969
# Filter by image variants - only download if the flavor matches one of the variants
7070
flavor_matches_variant = False

tests/github/test_download_metadata_files.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,7 @@ def test_download_metadata_file(downloads_dir, release_s3_bucket):
2323
s3_artifacts = S3Artifacts(TEST_GARDENLINUX_RELEASE_BUCKET_NAME)
2424
s3_artifacts._bucket = release_s3_bucket
2525

26-
cname = CName(
27-
"test-aws-gardener_prod",
28-
"amd64",
29-
"{0}-{1}".format(TEST_GARDENLINUX_RELEASE, TEST_GARDENLINUX_COMMIT_SHORT),
30-
)
26+
cname = CName("test-aws-gardener_prod", "amd64", TEST_GARDENLINUX_COMMIT_SHORT)
3127
download_metadata_file(
3228
s3_artifacts,
3329
cname.cname,
@@ -48,7 +44,7 @@ def test_download_metadata_file_no_such_release(downloads_dir, release_s3_bucket
4844

4945
release = "0000.0"
5046
commit = TEST_GARDENLINUX_COMMIT_SHORT
51-
cname = CName("aws-gardener_prod", "amd64", "{0}-{1}".format(release, commit))
47+
cname = CName("aws-gardener_prod", "amd64", commit)
5248

5349
with pytest.raises(IndexError):
5450
download_metadata_file(
@@ -70,7 +66,7 @@ def test_download_metadata_file_no_such_commit(downloads_dir, release_s3_bucket)
7066

7167
release = TEST_GARDENLINUX_RELEASE
7268
commit = "deadbeef"
73-
cname = CName("test-aws-gardener_prod", "amd64", "{0}-{1}".format(release, commit))
69+
cname = CName("test-aws-gardener_prod", "amd64", commit)
7470

7571
with pytest.raises(IndexError):
7672
download_metadata_file(
@@ -94,7 +90,7 @@ def test_download_metadata_file_no_such_release_and_commit(
9490

9591
release = "0000.0"
9692
commit = "deadbeef"
97-
cname = CName("test-aws-gardener_prod", "amd64", "{0}-{1}".format(release, commit))
93+
cname = CName("test-aws-gardener_prod", "amd64", commit)
9894

9995
with pytest.raises(IndexError):
10096
download_metadata_file(

0 commit comments

Comments
 (0)