-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4cf9899
commit 0a03c2e
Showing
5 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
"""This module contains the tests for the cosign container, the image with cosign pre-installed.""" | ||
|
||
from bci_tester.data import COSIGN_CONTAINERS | ||
|
||
CONTAINER_IMAGES = COSIGN_CONTAINERS | ||
|
||
|
||
def test_cosign_version(auto_container, host, container_runtime): | ||
"""Test that we can invoke `cosign version` successfully.""" | ||
|
||
assert ( | ||
"GitTreeState: release" | ||
in host.check_output( | ||
f"{container_runtime.runner_binary} run --rm {auto_container.image_url_or_id} version" | ||
).splitlines() | ||
) | ||
|
||
|
||
def test_cosign_verify(auto_container, host, container_runtime): | ||
"""Test that we can invoke `cosign verify` on a bci-container.""" | ||
assert "cosign container image signature" in host.check_output( | ||
f"{container_runtime.runner_binary} run --rm {auto_container.image_url_or_id} " | ||
"verify --key https://ftp.suse.com/pub/projects/security/keys/container-key.pem " | ||
"registry.suse.com/bci/bci-micro:latest" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters