-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
checking that the client is allowd to run against staging
Signed-off-by: javanlacerda <[email protected]>
- Loading branch information
1 parent
7375951
commit ef50109
Showing
3 changed files
with
77 additions
and
21 deletions.
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,24 @@ | ||
from test.conftest import _MakeMaterials | ||
|
||
import pytest # type: ignore | ||
|
||
from .client import SigstoreClient | ||
|
||
|
||
@pytest.mark.signing_staging | ||
def test_simple_staging(client: SigstoreClient, make_materials: _MakeMaterials) -> None: | ||
""" | ||
A simple test that signs and verifies an artifact for a given Sigstore | ||
client against staging. | ||
""" | ||
|
||
staging = True | ||
input_path, materials = make_materials("b.txt") | ||
assert not materials.exists() | ||
|
||
# Sign the artifact. | ||
client.sign(materials, input_path, staging) | ||
assert materials.exists() | ||
|
||
# Verify the artifact signature. | ||
client.verify(materials, input_path, staging) |