Move non-integration test to different test file
Signed-off-by: Cody Soyland <codysoyland@github.com>
This commit is contained in:
parent
82b509958a
commit
500b619a5e
2 changed files with 12 additions and 10 deletions
|
|
@ -87,6 +87,18 @@ func TestGetLocalAttestations(t *testing.T) {
|
|||
require.ErrorIs(t, err, ErrUnrecognisedBundleExtension)
|
||||
require.Nil(t, attestations)
|
||||
})
|
||||
|
||||
t.Run("with missing verification material", func(t *testing.T) {
|
||||
path := "../test/data/github_provenance_demo-0.0.12-py3-none-any-bundle-missing-verification-material.jsonl"
|
||||
_, err := GetLocalAttestations(path)
|
||||
require.ErrorContains(t, err, "missing verification material")
|
||||
})
|
||||
|
||||
t.Run("with missing verification certificate", func(t *testing.T) {
|
||||
path := "../test/data/github_provenance_demo-0.0.12-py3-none-any-bundle-missing-cert.jsonl"
|
||||
_, err := GetLocalAttestations(path)
|
||||
require.ErrorContains(t, err, "missing bundle content")
|
||||
})
|
||||
}
|
||||
|
||||
func TestFilterAttestations(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -42,16 +42,6 @@ func TestLiveSigstoreVerifier(t *testing.T) {
|
|||
require.NoError(t, res.Error)
|
||||
})
|
||||
|
||||
t.Run("with missing verification material", func(t *testing.T) {
|
||||
_, err := GetLocalAttestations("../test/data/github_provenance_demo-0.0.12-py3-none-any-bundle-missing-verification-material.jsonl")
|
||||
require.ErrorContains(t, err, "missing verification material")
|
||||
})
|
||||
|
||||
t.Run("with missing verification certificate", func(t *testing.T) {
|
||||
_, err := GetLocalAttestations("../test/data/github_provenance_demo-0.0.12-py3-none-any-bundle-missing-cert.jsonl")
|
||||
require.ErrorContains(t, err, "missing bundle content")
|
||||
})
|
||||
|
||||
t.Run("with GitHub Sigstore artifact", func(t *testing.T) {
|
||||
githubArtifactPath := test.NormalizeRelativePath("../test/data/github_provenance_demo-0.0.12-py3-none-any.whl")
|
||||
githubArtifact, err := artifact.NewDigestedArtifact(nil, githubArtifactPath, "sha256")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue