Skip to content

Commit

Permalink
revert: test cases introduced in #405
Browse files Browse the repository at this point in the history
Signed-off-by: Junjie Gao <[email protected]>
  • Loading branch information
JeyJeyGao committed May 31, 2024
1 parent ed268db commit bb0974d
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions notation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,37 +188,6 @@ func TestSignWithInvalidUserMetadata(t *testing.T) {
}
}

func TestSignOptsMissingSignatureMediaType(t *testing.T) {
repo := mock.NewRepository()
opts := SignOptions{
SignerSignOptions: SignerSignOptions{
SignatureMediaType: "",
},
ArtifactReference: mock.SampleArtifactUri,
}

_, err := Sign(context.Background(), &dummySigner{}, repo, opts)
if err == nil {
t.Fatalf("expected error but not found")
}
}

func TestSignOptsUnknownMediaType(t *testing.T) {
repo := mock.NewRepository()
opts := SignOptions{
SignerSignOptions: SignerSignOptions{
SignatureMediaType: "unknown",
},
ArtifactReference: mock.SampleArtifactUri,
}

_, err := Sign(context.Background(), &dummySigner{}, repo, opts)
if err == nil {
t.Fatalf("expected error but not found")
}

}

func TestRegistryResolveError(t *testing.T) {
policyDocument := dummyPolicyDocument()
repo := mock.NewRepository()
Expand Down

0 comments on commit bb0974d

Please sign in to comment.