Skip to content

Commit 5b4e785

Browse files
committed
test: Add missing SBOM and extra details mocks to package size test
1 parent dab609d commit 5b4e785

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

tests/store/tests_details.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ def test_package_size_in_channel_map(self):
394394
"""Test that package size is correctly included in channel map data"""
395395
payload = {
396396
"snap-id": "id",
397-
"name": "test-snap",
397+
"name": "toto",
398398
"default-track": None,
399399
"snap": {
400400
"title": "Test Snap",
@@ -425,6 +425,7 @@ def test_package_size_in_channel_map(self):
425425
"version": "1.0",
426426
"confinement": "strict",
427427
"download": {"size": 52428800}, # 50 MB
428+
"revision": 1,
428429
}
429430
],
430431
}
@@ -434,6 +435,19 @@ def test_package_size_in_channel_map(self):
434435
method="GET", url=self.api_url, json=payload, status=200
435436
)
436437
)
438+
responses.add(
439+
responses.Response(
440+
method="GET",
441+
url=self.api_url_details,
442+
json=EMPTY_EXTRA_DETAILS_PAYLOAD,
443+
status=200,
444+
)
445+
)
446+
responses.add(
447+
responses.Response(
448+
method="HEAD", url=self.api_url_sboms, json={}, status=200
449+
)
450+
)
437451

438452
metrics_url = "https://api.snapcraft.io/api/v1/snaps/metrics"
439453
responses.add(

0 commit comments

Comments
 (0)