Add target for none driver integration
Theres currently no good way to run the integration tests for the none driver locally. Now that we've added the e2e target, we can depend on that. Running the e2e test binary locally requires the testdata folder to be in a different path, since it is relative to where the code is being ran. I added a testdata-dir flag to the integration tests so we can set it appropriately for when we want to run the e2e binary by itself. I also made the e2e test binary a PHONY target, so we rebuild it each time. I had trouble collecting the dependencies on the integration test packagespull/1873/head
parent
3c9603ad64
commit
6c73183cea
4
Makefile
4
Makefile
|
@ -142,6 +142,10 @@ test-iso:
|
|||
integration: out/minikube
|
||||
go test -v -test.timeout=30m $(REPOPATH)/test/integration --tags=integration --minikube-args="$(MINIKUBE_ARGS)"
|
||||
|
||||
.PHONY: integration-none-driver
|
||||
integration-none-driver: e2e-linux-amd64 out/minikube-linux-amd64
|
||||
sudo -E out/e2e-linux-amd64 -testdata-dir "test/integration/testdata" -minikube-args="--vm-driver=none --alsologtostderr" -test.v -test.timeout=30m -binary=out/minikube-linux-amd64
|
||||
|
||||
.PHONY: integration-versioned
|
||||
integration-versioned: out/minikube
|
||||
go test -v -test.timeout=30m $(REPOPATH)/test/integration --tags="integration versioned" --minikube-args="$(MINIKUBE_ARGS)"
|
||||
|
|
|
@ -34,7 +34,7 @@ func testClusterDNS(t *testing.T) {
|
|||
|
||||
kubectlRunner := util.NewKubectlRunner(t)
|
||||
podName := "busybox"
|
||||
podPath, _ := filepath.Abs("testdata/busybox.yaml")
|
||||
podPath := filepath.Join(*testdataDir, "busybox.yaml")
|
||||
defer kubectlRunner.RunCommand([]string{"delete", "-f", podPath})
|
||||
|
||||
if _, err := kubectlRunner.RunCommand([]string{"create", "-f", podPath}); err != nil {
|
||||
|
|
|
@ -29,3 +29,4 @@ func TestMain(m *testing.M) {
|
|||
|
||||
var binaryPath = flag.String("binary", "../../out/minikube", "path to minikube binary")
|
||||
var args = flag.String("minikube-args", "", "Arguments to pass to minikube")
|
||||
var testdataDir = flag.String("testdata-dir", "testdata", "the directory relative to test/integration where the testdata lives")
|
||||
|
|
|
@ -59,7 +59,7 @@ func testProvisioning(t *testing.T) {
|
|||
}
|
||||
|
||||
// Now create the PVC
|
||||
pvcPath, _ := filepath.Abs("testdata/pvc.yaml")
|
||||
pvcPath := filepath.Join(*testdataDir, "pvc.yaml")
|
||||
if _, err := kubectlRunner.RunCommand([]string{"create", "-f", pvcPath}); err != nil {
|
||||
t.Fatalf("Error creating pvc")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue