MCPcopy Index your code
hub / github.com/getsops/sops / TestNewMasterKeyWithProfile

Function TestNewMasterKeyWithProfile

kms/keysource_test.go:126–140  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

124}
125
126func TestNewMasterKeyWithProfile(t *testing.T) {
127 var (
128 dummyRole = "a-role"
129 dummyEncryptionContext = map[string]*string{
130 "foo": aws.String("bar"),
131 }
132 dummyProfile = "a-profile"
133 )
134 key := NewMasterKeyWithProfile(dummyARN, dummyRole, dummyEncryptionContext, dummyProfile)
135 assert.Equal(t, dummyARN, key.Arn)
136 assert.Equal(t, dummyRole, key.Role)
137 assert.Equal(t, dummyEncryptionContext, key.EncryptionContext)
138 assert.Equal(t, dummyProfile, key.AwsProfile)
139 assert.NotNil(t, key.CreationDate)
140}
141
142func TestNewMasterKeyFromArn(t *testing.T) {
143 t.Run("arn", func(t *testing.T) {

Callers

nothing calls this directly

Calls 2

NewMasterKeyWithProfileFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected