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

Function TestSetArray

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

Source from the content-addressed store, hash-verified

1116}
1117
1118func TestSetArray(t *testing.T) {
1119 branch := TreeBranch{
1120 TreeItem{
1121 Key: "foo",
1122 Value: []interface{}{
1123 "one",
1124 "two",
1125 "three",
1126 },
1127 },
1128 }
1129 set, changed := branch.Set([]interface{}{"foo", 0}, "uno")
1130 assert.Equal(t, true, changed)
1131 assert.Equal(t, "uno", set[0].Value.([]interface{})[0])
1132}
1133
1134func TestSetArrayNew(t *testing.T) {
1135 branch := TreeBranch{}

Callers

nothing calls this directly

Calls 1

SetMethod · 0.95

Tested by

no test coverage detected