tests/image: remove travis constants

The tests are no longer run on Travis, therefore we don't need the special
setup to run them there.

This change should also fix #929 that is probably caused due to osbuild
executed in a weird way.

Fixes #929
This commit is contained in:
Ondřej Budai 2020-08-19 09:07:39 +02:00
parent 70c32ef7c5
commit e399c05cb4
3 changed files with 2 additions and 49 deletions

View file

@ -116,7 +116,7 @@ build:
go test -c -tags=integration -o osbuild-tests ./cmd/osbuild-tests/main_test.go
go test -c -tags=integration -o osbuild-weldr-tests ./internal/client/
go test -c -tags=integration -o osbuild-dnf-json-tests ./cmd/osbuild-dnf-json-tests/main_test.go
go test -c -tags=integration,travis -o osbuild-image-tests ./cmd/osbuild-image-tests/
go test -c -tags=integration -o osbuild-image-tests ./cmd/osbuild-image-tests/
.PHONY: install
install:

View file

@ -1,47 +0,0 @@
// +build travis
package constants
import (
"os"
"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
}
func GetImageInfoCommand(imagePath string) *exec.Cmd {
cmd := exec.Command(
"tools/image-info",
imagePath,
)
cmd.Env = append(os.Environ(), "PYTHONPATH=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",
}

View file

@ -1,4 +1,4 @@
// +build integration,!travis
// +build integration
package constants