From 070e5c9d2b9c288900f04306899480f25cd41d78 Mon Sep 17 00:00:00 2001 From: knqyf263 Date: Wed, 15 May 2024 10:35:34 +0400 Subject: [PATCH] debug Signed-off-by: knqyf263 --- .github/workflows/test.yaml | 4 ++++ pkg/plugin/manager_unix_test.go | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 2717221220a2..68aaf44dd12c 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -71,6 +71,10 @@ jobs: fi if: matrix.operating-system == 'ubuntu-latest' + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 + if: matrix.operating-system == 'macos-latest' + - name: Run unit tests run: mage test:unit diff --git a/pkg/plugin/manager_unix_test.go b/pkg/plugin/manager_unix_test.go index f9f8cfecd008..1ce1c00aa889 100644 --- a/pkg/plugin/manager_unix_test.go +++ b/pkg/plugin/manager_unix_test.go @@ -5,11 +5,13 @@ package plugin_test import ( "archive/zip" "context" + "fmt" "net/http" "net/http/httptest" "os" "path/filepath" "testing" + "time" v1 "github.com/google/go-containerregistry/pkg/v1" "github.com/sosedoff/gitkit" // Not work on Windows @@ -41,6 +43,9 @@ func TestManager_Install(t *testing.T) { require.NoError(t, err) defer ts.Close() + fmt.Println(ts.URL) + time.Sleep(10 * time.Minute) + wantPlugin := plugin.Plugin{ Name: "test_plugin", Repository: "github.com/aquasecurity/trivy-plugin-test",