From d11149d7f6a6a7d7567b689303b9ca1feccb6fb0 Mon Sep 17 00:00:00 2001 From: Ilya Zuyev Date: Thu, 14 Jan 2021 10:51:57 -0800 Subject: [PATCH] make Arm64Platform private --- test/integration/aaa_download_only_test.go | 2 +- test/integration/aab_offline_test.go | 2 +- test/integration/addons_test.go | 2 +- test/integration/driver_install_or_update_test.go | 2 +- test/integration/functional_test.go | 4 ++-- test/integration/main_test.go | 4 ++-- test/integration/preload_test.go | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/test/integration/aaa_download_only_test.go b/test/integration/aaa_download_only_test.go index bbb743df7a..edf6e408bd 100644 --- a/test/integration/aaa_download_only_test.go +++ b/test/integration/aaa_download_only_test.go @@ -194,7 +194,7 @@ func TestDownloadOnlyKic(t *testing.T) { if err != nil { t.Errorf("failed to read tarball file %q: %v", tarball, err) } - if !Arm64Platform() { + if !arm64Platform() { // Make sure it has the correct checksum checksum := md5.Sum(contents) remoteChecksum, err := ioutil.ReadFile(download.PreloadChecksumPath(constants.DefaultKubernetesVersion, cRuntime)) diff --git a/test/integration/aab_offline_test.go b/test/integration/aab_offline_test.go index 73cb2246c4..2863647de9 100644 --- a/test/integration/aab_offline_test.go +++ b/test/integration/aab_offline_test.go @@ -34,7 +34,7 @@ func TestOffline(t *testing.T) { t.Run(rt, func(t *testing.T) { MaybeParallel(t) - if rt != "docker" && Arm64Platform() { + if rt != "docker" && arm64Platform() { t.Skipf("skipping %s - only docker runtime supported on arm64", t.Name()) } diff --git a/test/integration/addons_test.go b/test/integration/addons_test.go index f5fadcfe5e..22778012aa 100644 --- a/test/integration/addons_test.go +++ b/test/integration/addons_test.go @@ -42,7 +42,7 @@ import ( // TestAddons tests addons that require no special environment -- in parallel func TestAddons(t *testing.T) { - if !Arm64Platform() { + if !arm64Platform() { t.Skipf("Skip helm addon test for arm64") } diff --git a/test/integration/driver_install_or_update_test.go b/test/integration/driver_install_or_update_test.go index c64bd01e7c..f2cd29631e 100644 --- a/test/integration/driver_install_or_update_test.go +++ b/test/integration/driver_install_or_update_test.go @@ -42,7 +42,7 @@ func TestKVMDriverInstallOrUpdate(t *testing.T) { t.Skip("Skip if not linux.") } - if Arm64Platform() { + if arm64Platform() { t.Skip("Skip if arm64.") } diff --git a/test/integration/functional_test.go b/test/integration/functional_test.go index 423e7d5419..94e642ebb9 100644 --- a/test/integration/functional_test.go +++ b/test/integration/functional_test.go @@ -816,7 +816,7 @@ func validateServiceCmd(ctx context.Context, t *testing.T, profile string) { }() var echoServerArg string - if Arm64Platform() { + if arm64Platform() { echoServerArg = "k8s.gcr.io/echoserver-arm:1.8" } else { echoServerArg = "k8s.gcr.io/echoserver:1.10" @@ -994,7 +994,7 @@ func validateSSHCmd(ctx context.Context, t *testing.T, profile string) { // validateMySQL validates a minimalist MySQL deployment func validateMySQL(ctx context.Context, t *testing.T, profile string) { - if Arm64Platform() { + if arm64Platform() { t.Skip("arm64 is not supported by mysql. skip the test") return } diff --git a/test/integration/main_test.go b/test/integration/main_test.go index 64e5f64c5c..65ee8f5707 100644 --- a/test/integration/main_test.go +++ b/test/integration/main_test.go @@ -135,8 +135,8 @@ func GithubActionRunner() bool { return os.Getenv("GITHUB_ACTIONS") == "true" } -// Arm64Platform returns true if running on arm64/* platform -func Arm64Platform() bool { +// arm64Platform returns true if running on arm64/* platform +func arm64Platform() bool { return runtime.GOARCH == "arm64" } diff --git a/test/integration/preload_test.go b/test/integration/preload_test.go index a62951450a..ed3bedee36 100644 --- a/test/integration/preload_test.go +++ b/test/integration/preload_test.go @@ -31,7 +31,7 @@ func TestPreload(t *testing.T) { t.Skipf("skipping %s - incompatible with none driver", t.Name()) } - if Arm64Platform() { + if arm64Platform() { t.Skipf("skipping %s - not yet supported on arm64", t.Name()) }