From 67662acd5c309129e6419d9ddc2fe86cbf0f2880 Mon Sep 17 00:00:00 2001 From: zongz Date: Wed, 4 Dec 2024 18:36:45 +0800 Subject: [PATCH] fix: fix windows test case Signed-off-by: zongz --- pkg/client/issues_test.go | 4 +++- pkg/client/push_test.go | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/client/issues_test.go b/pkg/client/issues_test.go index a6babb5e..19dba65f 100644 --- a/pkg/client/issues_test.go +++ b/pkg/client/issues_test.go @@ -436,7 +436,9 @@ func TestKpmIssue226(t *testing.T) { func TestKclIssue1768(t *testing.T) { testPath := "github.com/kcl-lang/kcl/issues/1768" test_push_with_tag := func(t *testing.T, kpmcli *KpmClient) { - + if runtime.GOOS == "windows" { + t.Skip("Skipping test on Windows") + } err := mock.StartDockerRegistry() if err != nil { t.Errorf("Error starting docker registry: %v", err) diff --git a/pkg/client/push_test.go b/pkg/client/push_test.go index ff5f6525..2aa2509e 100644 --- a/pkg/client/push_test.go +++ b/pkg/client/push_test.go @@ -3,6 +3,7 @@ package client import ( "bytes" "path/filepath" + "runtime" "testing" "github.com/stretchr/testify/assert" @@ -14,6 +15,9 @@ import ( func TestPush(t *testing.T) { testFunc := func(t *testing.T, kpmcli *KpmClient) { + if runtime.GOOS == "windows" { + t.Skip("Skipping test on Windows") + } err := mock.StartDockerRegistry() if err != nil { t.Errorf("Error starting docker registry: %v", err)