diff --git a/Makefile b/Makefile index 09151257085441319dcfe8af8ade5cc742e96940..04bfc3d50db61ad7431f7640ceb42570b3461878 100644 --- a/Makefile +++ b/Makefile @@ -297,6 +297,9 @@ integration-none-driver: e2e-linux-$(GOARCH) out/minikube-linux-$(GOARCH) ## Tr integration-versioned: out/minikube ## Trigger minikube integration testing, logs to ./out/testout_COMMIT.txt go test -ldflags="${MINIKUBE_LDFLAGS}" -v -test.timeout=90m $(INTEGRATION_TESTS_TO_RUN) --tags="$(MINIKUBE_INTEGRATION_BUILD_TAGS) versioned" $(TEST_ARGS) 2>&1 | tee "./out/testout_$(COMMIT_SHORT).txt" +.PHONY: functional +functional: integration-functional-only + .PHONY: integration-functional-only integration-functional-only: out/minikube$(IS_EXE) ## Trigger only functioanl tests in integration test, logs to ./out/testout_COMMIT.txt go test -ldflags="${MINIKUBE_LDFLAGS}" -v -test.timeout=20m $(INTEGRATION_TESTS_TO_RUN) --tags="$(MINIKUBE_INTEGRATION_BUILD_TAGS)" $(TEST_ARGS) -test.run TestFunctional 2>&1 | tee "./out/testout_$(COMMIT_SHORT).txt" diff --git a/hack/jenkins/installers/check_install_golang.sh b/hack/jenkins/installers/check_install_golang.sh index 9831a07908bf83b41d3028640572311e2ae29036..40cb0feaf1fecfdaf202b78d7fcc6b0cdcf67d83 100755 --- a/hack/jenkins/installers/check_install_golang.sh +++ b/hack/jenkins/installers/check_install_golang.sh @@ -52,10 +52,15 @@ function check_and_install_golang() { function install_golang() { echo "Installing golang version: $1 on $2" pushd /tmp >/dev/null + + INSTALLOS=linux + if [[ "$OSTYPE" == "darwin"* ]]; then + INSTALLOS=darwin + fi # using sudo because previously installed versions might have been installed by a different user. # as it was the case on jenkins VM. - sudo curl -qL -O "https://storage.googleapis.com/golang/go${1}.linux-amd64.tar.gz" && - sudo tar xfa go${1}.linux-amd64.tar.gz && + sudo curl -qL -O "https://storage.googleapis.com/golang/go${1}.${INSTALLOS}-amd64.tar.gz" && + sudo tar -xf go${1}.${INSTALLOS}-amd64.tar.gz && sudo rm -rf "${2}/go" && sudo mv go "${2}/" && sudo chown -R $(whoami): ${2}/go popd >/dev/null diff --git a/hack/jenkins/osx_integration_tests_hyperkit.sh b/hack/jenkins/osx_integration_tests_hyperkit.sh index f4e6726d771011a4ed7193e36ea112b8808e0835..302848d2cefa1658d8c9a8f56e28dac8cf45bc85 100755 --- a/hack/jenkins/osx_integration_tests_hyperkit.sh +++ b/hack/jenkins/osx_integration_tests_hyperkit.sh @@ -28,7 +28,7 @@ set -e OS_ARCH="darwin-amd64" VM_DRIVER="hyperkit" -JOB_NAME="HyperKit_macOS" +JOB_NAME="HyperKit_Functional_macOS" EXTRA_TEST_ARGS="-test.run TestFunctional" EXPECTED_DEFAULT_DRIVER="hyperkit" diff --git a/test/integration/functional_test.go b/test/integration/functional_test.go index 2a2b66a64ca889792e8955131be25831dc97899f..84c0eee9efc8d84967ef03d86e021df4c2cc2b12 100644 --- a/test/integration/functional_test.go +++ b/test/integration/functional_test.go @@ -38,6 +38,7 @@ import ( "github.com/google/go-cmp/cmp" + "k8s.io/minikube/pkg/drivers/kic/oci" "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/localpath" "k8s.io/minikube/pkg/minikube/reason" @@ -535,7 +536,11 @@ func validateCacheCmd(ctx context.Context, t *testing.T, profile string) { t.Run("add_local", func(t *testing.T) { if GithubActionRunner() && runtime.GOOS == "darwin" { t.Skipf("skipping this test because Docker can not run in macos on github action free version. https://github.community/t/is-it-possible-to-install-and-configure-docker-on-macos-runner/16981") + } + _, err := exec.LookPath(oci.Docker) + if err != nil { + t.Skipf("docker is not installed, skipping local image test") } dname, err := ioutil.TempDir("", profile) @@ -552,7 +557,7 @@ func validateCacheCmd(ctx context.Context, t *testing.T, profile string) { img := "minikube-local-cache-test:" + profile _, err = Run(t, exec.CommandContext(ctx, "docker", "build", "-t", img, dname)) if err != nil { - t.Errorf("failed to build docker image: %v", err) + t.Skipf("failed to build docker image, skipping local test: %v", err) } rr, err := Run(t, exec.CommandContext(ctx, Target(), "-p", profile, "cache", "add", img))