generator: "make test" passes again
there's a lot of boilerplate that is now expected in sigs.yaml
This commit is contained in:
parent
e331270db5
commit
6687a0892a
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue