(t *testing.T)
| 128 | } |
| 129 | |
| 130 | func TestEncodeIniWithDuplicateSections(t *testing.T) { |
| 131 | branches := sops.TreeBranches{ |
| 132 | sops.TreeBranch{ |
| 133 | sops.TreeItem{ |
| 134 | Key: "DEFAULT", |
| 135 | Value: interface{}(sops.TreeBranch(nil)), |
| 136 | }, |
| 137 | sops.TreeItem{ |
| 138 | Key: "foo", |
| 139 | Value: sops.TreeBranch{ |
| 140 | sops.TreeItem{ |
| 141 | Key: "foo", |
| 142 | Value: "bar", |
| 143 | }, |
| 144 | sops.TreeItem{ |
| 145 | Key: "baz", |
| 146 | Value: "3.0", |
| 147 | }, |
| 148 | sops.TreeItem{ |
| 149 | Key: "qux", |
| 150 | Value: "false", |
| 151 | }, |
| 152 | }, |
| 153 | }, |
| 154 | sops.TreeItem{ |
| 155 | Key: "foo", |
| 156 | Value: sops.TreeBranch{ |
| 157 | sops.TreeItem{ |
| 158 | Key: "foo", |
| 159 | Value: "bar", |
| 160 | }, |
| 161 | sops.TreeItem{ |
| 162 | Key: "baz", |
| 163 | Value: "3.0", |
| 164 | }, |
| 165 | sops.TreeItem{ |
| 166 | Key: "qux", |
| 167 | Value: "false", |
| 168 | }, |
| 169 | }, |
| 170 | }, |
| 171 | }, |
| 172 | } |
| 173 | out, err := Store{}.iniFromTreeBranches(branches) |
| 174 | assert.Nil(t, err) |
| 175 | expected, _ := Store{}.treeBranchesFromIni(out) |
| 176 | assert.Equal(t, expected, branches) |
| 177 | } |
| 178 | |
| 179 | func TestUnmarshalMetadataFromNonSOPSFile(t *testing.T) { |
| 180 | data := []byte(`hello=2`) |
nothing calls this directly
no test coverage detected