diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8147f524b..f11071774 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -64,6 +64,7 @@ jobs: - name: Trigger Windows binaries sign pipeline uses: benc-uk/workflow-dispatch@v1 + if: startsWith(github.ref, 'refs/tags/') with: workflow: Sign windows bin and installer repo: wiretrustee/windows-sign-pipeline diff --git a/client/cmd/up_daemon_test.go b/client/cmd/up_daemon_test.go index 8c79d44d8..3ed2482d1 100644 --- a/client/cmd/up_daemon_test.go +++ b/client/cmd/up_daemon_test.go @@ -8,6 +8,10 @@ import ( "github.com/wiretrustee/wiretrustee/client/internal" ) +var ( + cliAddr string +) + func TestUpDaemon(t *testing.T) { mgmAddr := startTestingServices(t) diff --git a/client/cmd/up_test.go b/client/cmd/up_test.go deleted file mode 100644 index 292013751..000000000 --- a/client/cmd/up_test.go +++ /dev/null @@ -1,66 +0,0 @@ -package cmd - -import ( - "net/url" - "testing" - "time" - - "github.com/wiretrustee/wiretrustee/iface" -) - -var ( - //signalAddr string - cliAddr string -) - -func TestUp(t *testing.T) { - mgmAddr := startTestingServices(t) - - tempDir := t.TempDir() - confPath := tempDir + "/config.json" - mgmtURL, err := url.Parse("http://" + mgmAddr) - if err != nil { - t.Fatal(err) - } - - rootCmd.SetArgs([]string{ - "up", - "--config", - confPath, - "--setup-key", - "A2C8E62B-38F5-4553-B31E-DD66C696CEBB", - "--management-url", - mgmtURL.String(), - "--log-level", - "debug", - "--log-file", - "console", - }) - - go func() { - if err := rootCmd.Execute(); err != nil { - t.Errorf("expected no error while running up command, got %v", err) - } - }() - time.Sleep(time.Second * 2) - - timeout := 30 * time.Second - timeoutChannel := time.After(timeout) - for { - select { - case <-timeoutChannel: - t.Fatalf("expected wireguard interface %s to be created before %s", iface.WgInterfaceDefault, timeout.String()) - default: - } - e, err := iface.Exists(iface.WgInterfaceDefault) - if err != nil { - continue - } - if err != nil { - continue - } - if *e { - break - } - } -}