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

Function TestMasterKey_ToMap

gcpkms/keysource_test.go:116–128  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

114}
115
116func TestMasterKey_ToMap(t *testing.T) {
117 key := MasterKey{
118 credentialJSON: []byte("sensitive creds"),
119 CreationDate: time.Date(2016, time.October, 31, 10, 0, 0, 0, time.UTC),
120 ResourceID: testResourceID,
121 EncryptedKey: "this is encrypted",
122 }
123 assert.Equal(t, map[string]interface{}{
124 "resource_id": testResourceID,
125 "enc": "this is encrypted",
126 "created_at": "2016-10-31T10:00:00Z",
127 }, key.ToMap())
128}
129
130func TestMasterKey_createCloudKMSService_withCredentialsFile(t *testing.T) {
131 tests := []struct {

Callers

nothing calls this directly

Calls 1

ToMapMethod · 0.95

Tested by

no test coverage detected