read image config from docker v2s1 manifests
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
bbe2dea0a6
commit
a0071de607
39 changed files with 1272 additions and 506 deletions
28
vendor/github.com/containers/image/signature/mechanism_openpgp_test.go
generated
vendored
Normal file
28
vendor/github.com/containers/image/signature/mechanism_openpgp_test.go
generated
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
// +build containers_image_openpgp
|
||||
|
||||
package signature
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestOpenpgpSigningMechanismSupportsSigning(t *testing.T) {
|
||||
mech, _, err := NewEphemeralGPGSigningMechanism([]byte{})
|
||||
require.NoError(t, err)
|
||||
defer mech.Close()
|
||||
err = mech.SupportsSigning()
|
||||
assert.Error(t, err)
|
||||
assert.IsType(t, SigningNotSupportedError(""), err)
|
||||
}
|
||||
|
||||
func TestOpenpgpSigningMechanismSign(t *testing.T) {
|
||||
mech, _, err := NewEphemeralGPGSigningMechanism([]byte{})
|
||||
require.NoError(t, err)
|
||||
defer mech.Close()
|
||||
_, err = mech.Sign([]byte{}, TestKeyFingerprint)
|
||||
assert.Error(t, err)
|
||||
assert.IsType(t, SigningNotSupportedError(""), err)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue