(t *testing.T)
| 209 | } |
| 210 | |
| 211 | func TestFlattenTreeBranch(t *testing.T) { |
| 212 | var ( |
| 213 | input = sops.TreeBranch{ |
| 214 | sops.TreeItem{ |
| 215 | Key: "key1", |
| 216 | Value: []interface{}{ |
| 217 | "foo", |
| 218 | }, |
| 219 | }, |
| 220 | sops.TreeItem{ |
| 221 | Key: "key2", |
| 222 | Value: []interface{}{ |
| 223 | "foo", |
| 224 | sops.TreeBranch{ |
| 225 | sops.TreeItem{ |
| 226 | Key: "foo", |
| 227 | Value: "bar", |
| 228 | }, |
| 229 | sops.TreeItem{ |
| 230 | Key: "baz", |
| 231 | Value: "bam", |
| 232 | }, |
| 233 | }, |
| 234 | }, |
| 235 | }, |
| 236 | sops.TreeItem{ |
| 237 | Key: "key3", |
| 238 | Value: sops.TreeBranch{ |
| 239 | sops.TreeItem{ |
| 240 | Key: "foo", |
| 241 | Value: "bar", |
| 242 | }, |
| 243 | sops.TreeItem{ |
| 244 | Key: "baz", |
| 245 | Value: "bam", |
| 246 | }, |
| 247 | }, |
| 248 | }, |
| 249 | sops.TreeItem{ |
| 250 | Key: "key4", |
| 251 | Value: sops.TreeBranch{ |
| 252 | sops.TreeItem{ |
| 253 | Key: "foo", |
| 254 | Value: "bar", |
| 255 | }, |
| 256 | sops.TreeItem{ |
| 257 | Key: "baz", |
| 258 | Value: "bam", |
| 259 | }, |
| 260 | }, |
| 261 | }, |
| 262 | } |
| 263 | expectedOutput = sops.TreeBranch{ |
| 264 | sops.TreeItem{ |
| 265 | Key: "prefixkey1__list_0", |
| 266 | Value: "foo", |
| 267 | }, |
| 268 | sops.TreeItem{ |
nothing calls this directly
no test coverage detected