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

Function TestSetExisting

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

Source from the content-addressed store, hash-verified

1139}
1140
1141func TestSetExisting(t *testing.T) {
1142 branch := TreeBranch{
1143 TreeItem{
1144 Key: "foo",
1145 Value: "foobar",
1146 },
1147 }
1148 set, changed := branch.Set([]interface{}{"foo"}, "bar")
1149 assert.Equal(t, true, changed)
1150 assert.Equal(t, "bar", set[0].Value)
1151}
1152
1153func TestSetArrayLeafNewItem(t *testing.T) {
1154 branch := TreeBranch{

Callers

nothing calls this directly

Calls 1

SetMethod · 0.95

Tested by

no test coverage detected