Skip to content

Commit

Permalink
bib: test for non-existent users stage with base config
Browse files Browse the repository at this point in the history
Check that the users stage is not added when there is no user in the
config.
  • Loading branch information
achilleas-k committed Feb 12, 2024
1 parent 2189ffb commit 4bfb69b
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions bib/cmd/bootc-image-builder/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,60 @@ func TestManifestSerialization(t *testing.T) {
},
}

baseConfig := getBaseConfig()
userConfig := getUserConfig()
testCases := map[string]manifestTestCase{
"ami-base": {
config: baseConfig,
imageType: "ami",
containers: diskContainers,
expStages: map[string][]string{
"build": {"org.osbuild.container-deploy"},
"ostree-deployment": {
"org.osbuild.ostree.deploy.container",
},
},
nexpStages: map[string][]string{
"build": {"org.osbuild.rpm"},
"ostree-deployment": {
"org.osbuild.users",
},
},
},
"raw-base": {
config: baseConfig,
imageType: "raw",
containers: diskContainers,
expStages: map[string][]string{
"build": {"org.osbuild.container-deploy"},
"ostree-deployment": {
"org.osbuild.ostree.deploy.container",
},
},
nexpStages: map[string][]string{
"build": {"org.osbuild.rpm"},
"ostree-deployment": {
"org.osbuild.users",
},
},
},
"qcow2-base": {
config: baseConfig,
imageType: "qcow2",
containers: diskContainers,
expStages: map[string][]string{
"build": {"org.osbuild.container-deploy"},
"ostree-deployment": {
"org.osbuild.ostree.deploy.container",
},
},
nexpStages: map[string][]string{
"build": {"org.osbuild.rpm"},
"ostree-deployment": {
"org.osbuild.users",
},
},
},
"ami-user": {
config: userConfig,
imageType: "ami",
Expand Down

0 comments on commit 4bfb69b

Please sign in to comment.