MCPcopy
hub / github.com/getsops/sops / TestSetNewKeyDeep

Function TestSetNewKeyDeep

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

Source from the content-addressed store, hash-verified

1097}
1098
1099func TestSetNewKeyDeep(t *testing.T) {
1100 branch := TreeBranch{
1101 TreeItem{
1102 Key: "foo",
1103 Value: "bar",
1104 },
1105 }
1106 set, changed := branch.Set([]interface{}{"foo", "bar", "baz"}, "hello")
1107 assert.Equal(t, true, changed)
1108 assert.Equal(t, "hello", set[0].Value.(TreeBranch)[0].Value.(TreeBranch)[0].Value)
1109}
1110
1111func TestSetNewKeyOnEmptyBranch(t *testing.T) {
1112 branch := TreeBranch{}

Callers

nothing calls this directly

Calls 1

SetMethod · 0.95

Tested by

no test coverage detected