mirror of
https://github.com/getsops/sops.git
synced 2026-02-05 12:45:21 +01:00
kms: add minimal test for NewMasterKeyWithProfile
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
This commit is contained in:
@@ -122,6 +122,22 @@ func TestNewMasterKey(t *testing.T) {
|
||||
assert.NotNil(t, key.CreationDate)
|
||||
}
|
||||
|
||||
func TestNewMasterKeyWithProfile(t *testing.T) {
|
||||
var (
|
||||
dummyRole = "a-role"
|
||||
dummyEncryptionContext = map[string]*string{
|
||||
"foo": aws.String("bar"),
|
||||
}
|
||||
dummyProfile = "a-profile"
|
||||
)
|
||||
key := NewMasterKeyWithProfile(dummyARN, dummyRole, dummyEncryptionContext, dummyProfile)
|
||||
assert.Equal(t, dummyARN, key.Arn)
|
||||
assert.Equal(t, dummyRole, key.Role)
|
||||
assert.Equal(t, dummyEncryptionContext, key.EncryptionContext)
|
||||
assert.Equal(t, dummyProfile, key.AwsProfile)
|
||||
assert.NotNil(t, key.CreationDate)
|
||||
}
|
||||
|
||||
func TestNewMasterKeyFromArn(t *testing.T) {
|
||||
t.Run("arn", func(t *testing.T) {
|
||||
var (
|
||||
|
||||
Reference in New Issue
Block a user