You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
744 B
40 lines
744 B
package kms
|
|
|
|
import (
|
|
"github.com/aws/aws-sdk-go/service/kms"
|
|
"reflect"
|
|
"testing"
|
|
)
|
|
|
|
func TestKmsClient_Decrypt(t *testing.T) {
|
|
type fields struct {
|
|
KmsC *kms.KMS
|
|
}
|
|
type args struct {
|
|
cipherText []byte
|
|
}
|
|
tests := []struct {
|
|
name string
|
|
fields fields
|
|
args args
|
|
want []byte
|
|
wantErr bool
|
|
}{
|
|
// TODO: Add test cases.
|
|
}
|
|
for _, tt := range tests {
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
k := &KmsClient{
|
|
KmsC: tt.fields.KmsC,
|
|
}
|
|
got, err := k.Decrypt(tt.args.cipherText)
|
|
if (err != nil) != tt.wantErr {
|
|
t.Errorf("Decrypt() error = %v, wantErr %v", err, tt.wantErr)
|
|
return
|
|
}
|
|
if !reflect.DeepEqual(got, tt.want) {
|
|
t.Errorf("Decrypt() got = %v, want %v", got, tt.want)
|
|
}
|
|
})
|
|
}
|
|
}
|
|
|