未验证 提交 9280a047 编写于 作者: S Sharif Elgamal 提交者: GitHub

Merge pull request #9894 from sharifelgamal/hyperkit

fix hyperkit tests
......@@ -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"
......
......@@ -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
......
......@@ -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"
......
......@@ -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))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册