diff --git a/keyservice/server_test.go b/keyservice/server_test.go index 147a69a27..cc29c4528 100644 --- a/keyservice/server_test.go +++ b/keyservice/server_test.go @@ -63,10 +63,10 @@ func TestKmsKeyToMasterKey(t *testing.T) { masterKey := kmsKeyToMasterKey(key) foundCtx := masterKey.EncryptionContext - for k, _ := range c.expectedCtx { + for k := range c.expectedCtx { require.Containsf(t, foundCtx, k, "Context does not contain expected key '%s'", k) } - for k, _ := range foundCtx { + for k := range foundCtx { require.Containsf(t, c.expectedCtx, k, "Context contains an unexpected key '%s' which cannot be found from expected map", k) } for k, expected := range c.expectedCtx { diff --git a/stores/dotenv/store.go b/stores/dotenv/store.go index 770e7101f..d4fd46e80 100644 --- a/stores/dotenv/store.go +++ b/stores/dotenv/store.go @@ -67,7 +67,7 @@ func (store *Store) LoadPlainFile(in []byte) (sops.TreeBranches, error) { } if line[0] == '#' { branch = append(branch, sops.TreeItem{ - Key: sops.Comment{string(line[1:])}, + Key: sops.Comment{string(line[1:])}, Value: nil, }) } else { diff --git a/stores/dotenv/store_test.go b/stores/dotenv/store_test.go index 93356dc6b..e623c3f56 100644 --- a/stores/dotenv/store_test.go +++ b/stores/dotenv/store_test.go @@ -25,7 +25,7 @@ var BRANCH = sops.TreeBranch{ Value: "val2", }, sops.TreeItem{ - Key: sops.Comment{"comment"}, + Key: sops.Comment{"comment"}, Value: nil, }, sops.TreeItem{ diff --git a/stores/flatten_test.go b/stores/flatten_test.go index 9b34644b8..b59a10928 100644 --- a/stores/flatten_test.go +++ b/stores/flatten_test.go @@ -99,8 +99,8 @@ func TestFlatten(t *testing.T) { }, } expected := map[string]interface{}{ - "foo": "bar", - "baz" + mapSeparator + "foo": 2, + "foo": "bar", + "baz" + mapSeparator + "foo": 2, "baz" + mapSeparator + "bar" + mapSeparator + "foo": 2, "qux" + listSeparator + "0": "hello", "qux" + listSeparator + "1": 1,