add wiretrustee LOGIN command (#90)

* feature: add wiretrustee LOGIN command

* chore: add management initial connection timeout

* test: add login cmd test

* test: validate generated config in login cmd

* test: add up command test

* chore: add timeout to signal client creation method

* test: close wireguard interface once test finished
This commit is contained in:
Mikhail Bragin
2021-08-18 13:35:42 +02:00
committed by GitHub
parent f7e51e7453
commit 1dfa99d07c
14 changed files with 557 additions and 244 deletions

View File

@@ -48,8 +48,10 @@ func NewClient(ctx context.Context, addr string, key wgtypes.Key, tlsEnabled boo
transportOption = grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{}))
}
sigCtx, cancel := context.WithTimeout(ctx, 3*time.Second)
defer cancel()
conn, err := grpc.DialContext(
ctx,
sigCtx,
addr,
transportOption,
grpc.WithBlock(),