debian-forge-composer/cmd/osbuild-image-tests/constants/constants-travis.go
Lars Karlitski b3e14a4e68 test/image: pass a temporary store to osbuild
When edd7b37ea added `--output-directory` to the invocation of osbuild,
it also removed `--store`.

This was a mistake: osbuild's default store is `.osbuild`, which is not
what we want. Restore the old behavior of passing a temporary directory,
but use the same for each test run.
2020-06-10 17:00:18 +02:00

35 lines
845 B
Go

// +build travis
package constants
import "os/exec"
func GetOsbuildCommand(store, outputDirectory string) *exec.Cmd {
cmd := exec.Command(
"python3",
"-m", "osbuild",
"--libdir", ".",
"--store", store,
"--output-directory", outputDirectory,
"--json",
"-",
)
cmd.Dir = "osbuild"
return cmd
}
var TestPaths = struct {
ImageInfo string
PrivateKey string
TestCasesDirectory string
UserData string
MetaData string
AzureDeploymentTemplate string
}{
ImageInfo: "tools/image-info",
PrivateKey: "test/keyring/id_rsa",
TestCasesDirectory: "test/cases",
UserData: "test/cloud-init/user-data",
MetaData: "test/cloud-init/meta-data",
AzureDeploymentTemplate: "test/azure-deployment-template.json",
}