Migrate structural and inspection fixtures

This commit is contained in:
2026-11-02 00:42:41 +00:00
parent 54bdc24865
commit eb87a10e1c
23 changed files with 140 additions and 81 deletions

View File

@@ -17,10 +17,10 @@ func TestLayeredSequenceProjectsNestedSourceDestinations(t *testing.T) {
t.Run(fmt.Sprintf("%s/underlay=%t", mode, underlay), func(t *testing.T) {
files := fstest.MapFS{}
for _, id := range []string{"a", "b", "c"} {
files[id+"/record.yml"] = &fstest.MapFile{Data: []byte("configkit: {imports: [{path: helper.yml}]}\nid: " + id + "\n")}
files[id+"/record.yml"] = &fstest.MapFile{Data: []byte("config: {imports: [{path: helper.yml}]}\nid: " + id + "\n")}
files[id+"/helper.yml"] = &fstest.MapFile{Data: []byte("value: " + id + "\n")}
}
files["main.yml"] = &fstest.MapFile{Data: []byte("configkit:\n sequences: [{destination: [items], key: id, mode: " + mode + "}]\n imports: [{glob: '*/record.yml', destination: [items], placement: sequence-item}]\n")}
files["main.yml"] = &fstest.MapFile{Data: []byte("config:\n sequences: [{destination: [items], key: id, mode: " + mode + "}]\n imports: [{glob: '*/record.yml', destination: [items], placement: sequence-item}]\n")}
lower := "items: [{id: b}, {id: a}, {id: keep}]\n"
want := map[string]int{"a": 1, "b": 0, "c": 3}
if mode == "append" {