mirror of
https://github.com/netbirdio/netbird.git
synced 2025-06-22 18:51:34 +02:00
Remove up_test (#268)
up_test is redundant because it is tested in up_daemon_test Co-authored-by: mlsmaycon <mlsmaycon@gmail.com>
This commit is contained in:
parent
3a69f334e8
commit
957474817f
1
.github/workflows/release.yml
vendored
1
.github/workflows/release.yml
vendored
@ -64,6 +64,7 @@ jobs:
|
|||||||
-
|
-
|
||||||
name: Trigger Windows binaries sign pipeline
|
name: Trigger Windows binaries sign pipeline
|
||||||
uses: benc-uk/workflow-dispatch@v1
|
uses: benc-uk/workflow-dispatch@v1
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
with:
|
with:
|
||||||
workflow: Sign windows bin and installer
|
workflow: Sign windows bin and installer
|
||||||
repo: wiretrustee/windows-sign-pipeline
|
repo: wiretrustee/windows-sign-pipeline
|
||||||
|
@ -8,6 +8,10 @@ import (
|
|||||||
"github.com/wiretrustee/wiretrustee/client/internal"
|
"github.com/wiretrustee/wiretrustee/client/internal"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
cliAddr string
|
||||||
|
)
|
||||||
|
|
||||||
func TestUpDaemon(t *testing.T) {
|
func TestUpDaemon(t *testing.T) {
|
||||||
mgmAddr := startTestingServices(t)
|
mgmAddr := startTestingServices(t)
|
||||||
|
|
||||||
|
@ -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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user