main: add disk customization to blueprint smoke test
Adding the disk customization to the blueprint test helps to ensure that strict TOML checking works as expected. There was a (brief) regression because manifest generation with disk toml was not tested.
This commit is contained in:
parent
a2f71ad44c
commit
f06b07c247
1 changed files with 13 additions and 15 deletions
|
|
@ -130,24 +130,22 @@ func hasDepsolveDnf() bool {
|
|||
return err == nil
|
||||
}
|
||||
|
||||
var testBlueprint = `{
|
||||
"containers": [
|
||||
{
|
||||
"source": "registry.gitlab.com/redhat/services/products/image-builder/ci/osbuild-composer/fedora-minimal"
|
||||
}
|
||||
],
|
||||
"customizations": {
|
||||
"user": [
|
||||
{
|
||||
"name": "alice"
|
||||
}
|
||||
]
|
||||
}
|
||||
}`
|
||||
var testBlueprint = `
|
||||
[[containers]]
|
||||
source = "registry.gitlab.com/redhat/services/products/image-builder/ci/osbuild-composer/fedora-minimal"
|
||||
|
||||
[[customizations.user]]
|
||||
name = "alice"
|
||||
|
||||
[[customizations.disk.partitions]]
|
||||
type = "lvm"
|
||||
name = "mainvg"
|
||||
minsize = "20 GiB"
|
||||
`
|
||||
|
||||
func makeTestBlueprint(t *testing.T, testBlueprint string) string {
|
||||
tmpdir := t.TempDir()
|
||||
blueprintPath := filepath.Join(tmpdir, "blueprint.json")
|
||||
blueprintPath := filepath.Join(tmpdir, "blueprint.toml")
|
||||
err := os.WriteFile(blueprintPath, []byte(testBlueprint), 0644)
|
||||
assert.NoError(t, err)
|
||||
return blueprintPath
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue