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

Function TestUnsetKeyRootLeaf

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

Source from the content-addressed store, hash-verified

1196}
1197
1198func TestUnsetKeyRootLeaf(t *testing.T) {
1199 branch := TreeBranch{
1200 TreeItem{
1201 Key: "foo",
1202 Value: "foo",
1203 },
1204 TreeItem{
1205 Key: "foofoo",
1206 Value: "foofoo",
1207 },
1208 }
1209 unset, err := branch.Unset([]interface{}{"foofoo"})
1210 assert.NoError(t, err)
1211 assert.Equal(t, TreeBranch{
1212 TreeItem{
1213 Key: "foo",
1214 Value: "foo",
1215 },
1216 }, unset)
1217}
1218
1219func TestUnsetKeyBranchLeaf(t *testing.T) {
1220 branch := TreeBranch{

Callers

nothing calls this directly

Calls 1

UnsetMethod · 0.95

Tested by

no test coverage detected