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

Function TestSetArrayLeafNewItem

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

Source from the content-addressed store, hash-verified

1151}
1152
1153func TestSetArrayLeafNewItem(t *testing.T) {
1154 branch := TreeBranch{
1155 TreeItem{
1156 Key: "array",
1157 Value: []interface{}{},
1158 },
1159 }
1160 set, changed := branch.Set([]interface{}{"array", 2}, "hello")
1161 assert.Equal(t, true, changed)
1162 assert.Equal(t, TreeBranch{
1163 TreeItem{
1164 Key: "array",
1165 Value: []interface{}{
1166 "hello",
1167 },
1168 },
1169 }, set)
1170}
1171
1172func TestSetArrayNonLeaf(t *testing.T) {
1173 branch := TreeBranch{

Callers

nothing calls this directly

Calls 1

SetMethod · 0.95

Tested by

no test coverage detected