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

Function TestUnsetKeyBranchLeaf

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

Source from the content-addressed store, hash-verified

1217}
1218
1219func TestUnsetKeyBranchLeaf(t *testing.T) {
1220 branch := TreeBranch{
1221 TreeItem{
1222 Key: "foo",
1223 Value: TreeBranch{
1224 TreeItem{
1225 Key: "bar",
1226 Value: "bar",
1227 },
1228 TreeItem{
1229 Key: "barbar",
1230 Value: "barbar",
1231 },
1232 },
1233 },
1234 }
1235 unset, err := branch.Unset([]interface{}{"foo", "barbar"})
1236 assert.NoError(t, err)
1237 assert.Equal(t, TreeBranch{
1238 TreeItem{
1239 Key: "foo",
1240 Value: TreeBranch{
1241 TreeItem{
1242 Key: "bar",
1243 Value: "bar",
1244 },
1245 },
1246 },
1247 }, unset)
1248}
1249
1250func TestUnsetKeyBranch(t *testing.T) {
1251 branch := TreeBranch{

Callers

nothing calls this directly

Calls 1

UnsetMethod · 0.95

Tested by

no test coverage detected