Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it easier to run verification test locally #100

Merged
merged 2 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,13 @@ invoke the client.
Running the conformance suite locally,

```sh
(env) $ pytest --entrypoint=SIGSTORE_CLIENT --identity-token=$(gh auth token)
(env) $ pytest test --entrypoint=SIGSTORE_CLIENT --identity-token=$(gh auth token)
```

Or if you are only checking verification use cases,

```sh
(env) $ pytest test --skip-signing --entrypoint=SIGSTORE_CLIENT
```

Using the [`gh` CLI](https://cli.github.com/) and noting SIGSTORE_CLIENT is the absolute path to a client implementing the [CLI specification](https://github.com/sigstore/sigstore-conformance/blob/main/docs/cli_protocol.md).
Expand Down
4 changes: 3 additions & 1 deletion test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ def pytest_addoption(parser) -> None:
"--github-token",
action="store",
help="the GitHub token to supply to the Sigstore client under test",
required=True,
steiza marked this conversation as resolved.
Show resolved Hide resolved
type=str,
)
parser.addoption(
Expand All @@ -73,6 +72,9 @@ def pytest_configure(config):

@pytest.fixture
def identity_token(pytestconfig) -> str:
if pytestconfig.getoption("--skip-signing"):
return ""

gh_token = pytestconfig.getoption("--github-token")
session = requests.Session()
headers = {
Expand Down