Attempt to clarify the structure of our tests. Each test case is now encapsulated in a script in `test/cases`. Each of these scripts should be runnable on a pristine machine and be independent of each other. It is up to the test-orchestractor to decide if they should be run consequtively instance, or in parallel on separate instances. Each script can execute several tests and call whatever helper binaries is desired. However, each case should be assumed to always run as one.
38 lines
1.1 KiB
Go
38 lines
1.1 KiB
Go
// +build integration
|
|
|
|
package constants
|
|
|
|
import "os/exec"
|
|
|
|
func GetOsbuildCommand(store, outputDirectory string) *exec.Cmd {
|
|
return exec.Command(
|
|
"osbuild",
|
|
"--store", store,
|
|
"--output-directory", outputDirectory,
|
|
"--json",
|
|
"-",
|
|
)
|
|
}
|
|
|
|
func GetImageInfoCommand(imagePath string) *exec.Cmd {
|
|
return exec.Command(
|
|
"/usr/libexec/osbuild-composer-test/image-info",
|
|
imagePath,
|
|
)
|
|
}
|
|
|
|
var TestPaths = struct {
|
|
ImageInfo string
|
|
PrivateKey string
|
|
TestCasesDirectory string
|
|
UserData string
|
|
MetaData string
|
|
AzureDeploymentTemplate string
|
|
}{
|
|
ImageInfo: "/usr/libexec/osbuild-composer-test/image-info",
|
|
PrivateKey: "/usr/share/tests/osbuild-composer/keyring/id_rsa",
|
|
TestCasesDirectory: "/usr/share/tests/osbuild-composer/cases",
|
|
UserData: "/usr/share/tests/osbuild-composer/cloud-init/user-data",
|
|
MetaData: "/usr/share/tests/osbuild-composer/cloud-init/meta-data",
|
|
AzureDeploymentTemplate: "/usr/share/tests/osbuild-composer/azure/deployment-template.json",
|
|
}
|