Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions pyartcd/tests/pipelines/test_promote.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ async def test_run_without_explicit_assembly_definition(
working_dir=Path("/path/to/working"),
dry_run=False
)
pipeline = await PromotePipeline.create(runtime, group="openshift-4.10", assembly="4.10.99", signing_env="prod")
pipeline = await PromotePipeline.create(runtime, group="openshift-4.10", assembly="4.10.99",
signing_env="prod", skip_sigstore=True)
with self.assertRaisesRegex(ValueError, "must be explicitly defined"):
await pipeline.run()
load_group_config.assert_awaited_once()
Expand All @@ -157,7 +158,8 @@ async def test_run_with_stream_assembly(self, load_group_config: AsyncMock, load
working_dir=Path("/path/to/working"),
dry_run=False
)
pipeline = await PromotePipeline.create(runtime, group="openshift-4.10", assembly="stream", signing_env="prod")
pipeline = await PromotePipeline.create(runtime, group="openshift-4.10", assembly="stream",
signing_env="prod", skip_sigstore=True)
with self.assertRaisesRegex(ValueError, "not supported"):
await pipeline.run()
load_group_config.assert_awaited_once()
Expand All @@ -184,7 +186,8 @@ async def test_run_with_custom_assembly_and_missing_release_offset(
dry_run=False,
new_slack_client=MagicMock(return_value=AsyncMock())
)
pipeline = await PromotePipeline.create(runtime, group="openshift-4.10", assembly="art0001", signing_env="prod")
pipeline = await PromotePipeline.create(runtime, group="openshift-4.10", assembly="art0001",
signing_env="prod", skip_sigstore=True)
with self.assertRaisesRegex(ValueError, "patch_version is not set"):
await pipeline.run()
load_group_config.assert_awaited_once()
Expand Down Expand Up @@ -238,7 +241,7 @@ async def test_run_with_custom_assembly(self, get_image_stream: AsyncMock, load_

pipeline = await PromotePipeline.create(
runtime, group="openshift-4.10", assembly="art0001",
skip_attached_bug_check=True, skip_mirror_binaries=True, signing_env="prod")
skip_attached_bug_check=True, skip_mirror_binaries=True, signing_env="prod", skip_sigstore=True)

await pipeline.run()
load_group_config.assert_awaited_once()
Expand Down Expand Up @@ -281,7 +284,8 @@ async def test_run_with_standard_assembly_without_upgrade_edges(self, load_group
runtime.new_slack_client.return_value = AsyncMock()
runtime.new_slack_client.return_value.say.return_value = {'message': {'ts': ''}}
runtime.new_slack_client.return_value.bind_channel = MagicMock()
pipeline = await PromotePipeline.create(runtime, group="openshift-4.10", assembly="4.10.99", signing_env="prod")
pipeline = await PromotePipeline.create(runtime, group="openshift-4.10", assembly="4.10.99",
signing_env="prod", skip_sigstore=True)

with self.assertRaisesRegex(ValueError, "missing the required `upgrades` field"):
await pipeline.run()
Expand Down Expand Up @@ -312,7 +316,8 @@ async def test_run_with_standard_assembly_without_image_advisory(self, load_grou
runtime.new_slack_client.return_value.say.return_value = {'message': {'ts': ''}}
runtime.new_slack_client.return_value.bind_channel = MagicMock()

pipeline = await PromotePipeline.create(runtime, group="openshift-4.10", assembly="4.10.99", signing_env="prod")
pipeline = await PromotePipeline.create(runtime, group="openshift-4.10", assembly="4.10.99",
signing_env="prod", skip_sigstore=True)
pipeline.check_blocker_bugs = AsyncMock()

with self.assertRaisesRegex(VerificationError, "No associated image advisory"):
Expand Down Expand Up @@ -345,7 +350,8 @@ async def test_run_with_standard_assembly_without_liveid(self, load_group_config
runtime.new_slack_client.return_value.say.return_value = {'message': {'ts': ''}}
runtime.new_slack_client.return_value.bind_channel = MagicMock()

pipeline = await PromotePipeline.create(runtime, group="openshift-4.10", assembly="4.10.99", signing_env="prod")
pipeline = await PromotePipeline.create(runtime, group="openshift-4.10", assembly="4.10.99",
signing_env="prod", skip_sigstore=True)
pipeline.check_blocker_bugs = AsyncMock()
pipeline.change_advisory_state = AsyncMock()
pipeline.get_advisory_info = AsyncMock(return_value={
Expand Down Expand Up @@ -384,7 +390,8 @@ async def test_run_with_standard_assembly_invalid_errata_status(self, load_group
runtime.new_slack_client.return_value.say.return_value = {'message': {'ts': ''}}
runtime.new_slack_client.return_value.bind_channel = MagicMock()

pipeline = await PromotePipeline.create(runtime, group="openshift-4.10", assembly="4.10.99", signing_env="prod")
pipeline = await PromotePipeline.create(runtime, group="openshift-4.10", assembly="4.10.99",
signing_env="prod", skip_sigstore=True)
pipeline.check_blocker_bugs = AsyncMock()
pipeline.change_advisory_state = AsyncMock()
pipeline.get_advisory_info = AsyncMock(return_value={
Expand Down Expand Up @@ -457,7 +464,7 @@ async def test_run_with_standard_assembly(self, get_image_stream: AsyncMock, loa
runtime.new_slack_client.return_value.bind_channel = MagicMock()
pipeline = await PromotePipeline.create(
runtime, group="openshift-4.10", assembly="4.10.99",
skip_mirror_binaries=True, signing_env="prod")
skip_mirror_binaries=True, signing_env="prod", skip_sigstore=True)
pipeline.check_blocker_bugs = AsyncMock()
pipeline.change_advisory_state = AsyncMock()
pipeline.get_advisory_info = AsyncMock(return_value={
Expand Down