blueprint: don't set omitempty for toml groups and modules
The integration tests expect the empty arrays to be there.
This commit is contained in:
parent
0718766fbc
commit
ea70d9dfc5
2 changed files with 8 additions and 9 deletions
|
|
@ -7,11 +7,8 @@ type Blueprint struct {
|
||||||
Description string `json:"description" toml:"description"`
|
Description string `json:"description" toml:"description"`
|
||||||
Version string `json:"version,omitempty" toml:"version,omitempty"`
|
Version string `json:"version,omitempty" toml:"version,omitempty"`
|
||||||
Packages []Package `json:"packages" toml:"packages"`
|
Packages []Package `json:"packages" toml:"packages"`
|
||||||
|
Modules []Package `json:"modules" toml:"modules"`
|
||||||
// skip "omitempty" for json, because cockpit-composer chokes when the keys are missing
|
Groups []Group `json:"groups" toml:"groups"`
|
||||||
Modules []Package `json:"modules" toml:"modules,omitempty"`
|
|
||||||
Groups []Group `json:"groups" toml:"groups,omitempty"`
|
|
||||||
|
|
||||||
Customizations *Customizations `json:"customizations,omitempty" toml:"customizations,omitempty"`
|
Customizations *Customizations `json:"customizations,omitempty" toml:"customizations,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -170,6 +170,8 @@ func TestBlueprintsInfoToml(t *testing.T) {
|
||||||
Packages: []blueprint.Package{
|
Packages: []blueprint.Package{
|
||||||
{"httpd", "2.4.*"},
|
{"httpd", "2.4.*"},
|
||||||
},
|
},
|
||||||
|
Groups: []blueprint.Group{},
|
||||||
|
Modules: []blueprint.Package{},
|
||||||
}
|
}
|
||||||
if diff := cmp.Diff(got, expected); diff != "" {
|
if diff := cmp.Diff(got, expected); diff != "" {
|
||||||
t.Fatalf("received unexpected blueprint: %s", diff)
|
t.Fatalf("received unexpected blueprint: %s", diff)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue