diff options
| author | Aaron Crickenberger <spiffxp@gmail.com> | 2021-03-07 23:48:24 -0500 |
|---|---|---|
| committer | Aaron Crickenberger <spiffxp@google.com> | 2021-03-09 14:12:03 -0500 |
| commit | 6687a0892a7a2bf94bf2c1f087ba23ccd750b244 (patch) | |
| tree | 43ee65d0936f491ac1924110a5bdcc452eab2d86 /generator | |
| parent | e331270db5fd263b21e9956921ee25725af94373 (diff) | |
generator: "make test" passes again
there's a lot of boilerplate that is now expected in sigs.yaml
Diffstat (limited to 'generator')
| -rw-r--r-- | generator/app_test.go | 13 | ||||
| -rw-r--r-- | generator/testdata/sigs.yaml | 20 |
2 files changed, 25 insertions, 8 deletions
diff --git a/generator/app_test.go b/generator/app_test.go index f22d16c0..381acc46 100644 --- a/generator/app_test.go +++ b/generator/app_test.go @@ -155,19 +155,22 @@ func TestGroupDirName(t *testing.T) { func TestCreateGroupReadmes(t *testing.T) { baseGeneratorDir = "generated" templateDir = "../../generator" + const groupType = "sig" - groups := []Group{ - {Name: "Foo"}, - {Name: "Bar"}, + groups := []Group{} + for _, n := range []string{"Foo", "Bar"} { + g := Group{Name: n} + g.Dir = g.DirName(groupType) + groups = append(groups, g) } - err := createGroupReadme(groups, "sig") + err := createGroupReadme(groups, groupType) if err != nil { t.Fatal(err) } for _, group := range groups { - path := filepath.Join(baseGeneratorDir, group.DirName("sig"), "README.md") + path := filepath.Join(baseGeneratorDir, group.DirName(groupType), "README.md") if !pathExists(path) { t.Fatalf("%s should exist", path) } diff --git a/generator/testdata/sigs.yaml b/generator/testdata/sigs.yaml index a4fe858c..60474dda 100644 --- a/generator/testdata/sigs.yaml +++ b/generator/testdata/sigs.yaml @@ -1,5 +1,19 @@ sigs: - - name: Foo - - name: Bar + - dir: sig-foo + name: Foo + label: foo + charter_link: foo-charter + mission_statement: covers foo + subprojects: + - name: sub-foo + - dir: sig-bar + name: Bar + label: bar + charter_link: charter-bar + mission_statement: owns areas related to bar + subprojects: + - name: sub-bar workinggroups: - - name: Baz + - dir: wg-baz + name: Baz + label: baz |
