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

Function TestSetNewKeyOnEmptyBranch

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

Source from the content-addressed store, hash-verified

1109}
1110
1111func TestSetNewKeyOnEmptyBranch(t *testing.T) {
1112 branch := TreeBranch{}
1113 set, changed := branch.Set([]interface{}{"foo", "bar", "baz"}, "hello")
1114 assert.Equal(t, true, changed)
1115 assert.Equal(t, "hello", set[0].Value.(TreeBranch)[0].Value.(TreeBranch)[0].Value)
1116}
1117
1118func TestSetArray(t *testing.T) {
1119 branch := TreeBranch{

Callers

nothing calls this directly

Calls 1

SetMethod · 0.95

Tested by

no test coverage detected