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

Function TestSetArrayDeepNew

sops_test.go:1084–1097  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1082}
1083
1084func TestSetArrayDeepNew(t *testing.T) {
1085 branch := TreeBranch{
1086 TreeItem{
1087 Key: "foo",
1088 Value: []interface{}{
1089 "one",
1090 "two",
1091 },
1092 },
1093 }
1094 set, changed := branch.Set([]interface{}{"foo", 2, "bar"}, "hello")
1095 assert.Equal(t, true, changed)
1096 assert.Equal(t, "hello", set[0].Value.([]interface{})[2].(TreeBranch)[0].Value)
1097}
1098
1099func TestSetNewKeyDeep(t *testing.T) {
1100 branch := TreeBranch{

Callers

nothing calls this directly

Calls 1

SetMethod · 0.95

Tested by

no test coverage detected