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

Function TestSetNewKeyUnchanged

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

Source from the content-addressed store, hash-verified

1029}
1030
1031func TestSetNewKeyUnchanged(t *testing.T) {
1032 branch := TreeBranch{
1033 TreeItem{
1034 Key: "foo",
1035 Value: TreeBranch{
1036 TreeItem{
1037 Key: "bar",
1038 Value: TreeBranch{
1039 TreeItem{
1040 Key: "baz",
1041 Value: "foobar",
1042 },
1043 },
1044 },
1045 },
1046 },
1047 }
1048 set, changed := branch.Set([]interface{}{"foo", "bar", "baz"}, "foobar")
1049 assert.Equal(t, false, changed)
1050 assert.Equal(t, "foobar", set[0].Value.(TreeBranch)[0].Value.(TreeBranch)[0].Value)
1051}
1052
1053func TestSetNewBranch(t *testing.T) {
1054 branch := TreeBranch{

Callers

nothing calls this directly

Calls 1

SetMethod · 0.95

Tested by

no test coverage detected