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

Function TestUnsetKeyBranch

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

Source from the content-addressed store, hash-verified

1248}
1249
1250func TestUnsetKeyBranch(t *testing.T) {
1251 branch := TreeBranch{
1252 TreeItem{
1253 Key: "foo",
1254 Value: "foo",
1255 },
1256 TreeItem{
1257 Key: "foofoo",
1258 Value: TreeBranch{
1259 TreeItem{
1260 Key: "bar",
1261 Value: "bar",
1262 },
1263 },
1264 },
1265 }
1266 unset, err := branch.Unset([]interface{}{"foofoo"})
1267 assert.NoError(t, err)
1268 assert.Equal(t, TreeBranch{
1269 TreeItem{
1270 Key: "foo",
1271 Value: "foo",
1272 },
1273 }, unset)
1274}
1275
1276func TestUnsetKeyRootLastLeaf(t *testing.T) {
1277 branch := TreeBranch{

Callers

nothing calls this directly

Calls 1

UnsetMethod · 0.95

Tested by

no test coverage detected