SSH: Lint and typos
This commit is contained in:
parent
3695284286
commit
fd6d25b5c1
3 changed files with 6 additions and 4 deletions
|
@ -6,7 +6,7 @@ import (
|
||||||
"github.com/juanfont/headscale/integration/dockertestutil"
|
"github.com/juanfont/headscale/integration/dockertestutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
// This file is intendet to "test the test framework", by proxy it will also test
|
// This file is intended to "test the test framework", by proxy it will also test
|
||||||
// some Headcsale/Tailscale stuff, but mostly in very simple ways.
|
// some Headcsale/Tailscale stuff, but mostly in very simple ways.
|
||||||
|
|
||||||
func IntegrationSkip(t *testing.T) {
|
func IntegrationSkip(t *testing.T) {
|
||||||
|
|
|
@ -12,14 +12,15 @@ import (
|
||||||
func TestSSHOneNamespaceAllToAll(t *testing.T) {
|
func TestSSHOneNamespaceAllToAll(t *testing.T) {
|
||||||
IntegrationSkip(t)
|
IntegrationSkip(t)
|
||||||
|
|
||||||
retry := func(times int, sleepInverval time.Duration, doWork func() (string, error)) (string, error) {
|
retry := func(times int, sleepInterval time.Duration, doWork func() (string, error)) (string, error) {
|
||||||
var err error
|
var err error
|
||||||
for attempts := 0; attempts < times; attempts++ {
|
for attempts := 0; attempts < times; attempts++ {
|
||||||
result, err := doWork()
|
var result string
|
||||||
|
result, err = doWork()
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return result, nil
|
return result, nil
|
||||||
}
|
}
|
||||||
time.Sleep(sleepInverval)
|
time.Sleep(sleepInterval)
|
||||||
}
|
}
|
||||||
|
|
||||||
return "", err
|
return "", err
|
||||||
|
|
|
@ -7,6 +7,7 @@ import (
|
||||||
"tailscale.com/ipn/ipnstate"
|
"tailscale.com/ipn/ipnstate"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
//nolint
|
||||||
type TailscaleClient interface {
|
type TailscaleClient interface {
|
||||||
Hostname() string
|
Hostname() string
|
||||||
Shutdown() error
|
Shutdown() error
|
||||||
|
|
Loading…
Reference in a new issue