From fd6d25b5c1934f65399f5d3ff9ee3485f2c796d2 Mon Sep 17 00:00:00 2001 From: Even Holthe Date: Tue, 8 Nov 2022 22:33:11 +0100 Subject: [PATCH] SSH: Lint and typos --- integration/scenario_test.go | 2 +- integration/ssh_test.go | 7 ++++--- integration/tailscale.go | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/integration/scenario_test.go b/integration/scenario_test.go index 5504a814..363f8e37 100644 --- a/integration/scenario_test.go +++ b/integration/scenario_test.go @@ -6,7 +6,7 @@ import ( "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. func IntegrationSkip(t *testing.T) { diff --git a/integration/ssh_test.go b/integration/ssh_test.go index 565434e8..fe364c5e 100644 --- a/integration/ssh_test.go +++ b/integration/ssh_test.go @@ -12,14 +12,15 @@ import ( func TestSSHOneNamespaceAllToAll(t *testing.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 for attempts := 0; attempts < times; attempts++ { - result, err := doWork() + var result string + result, err = doWork() if err == nil { return result, nil } - time.Sleep(sleepInverval) + time.Sleep(sleepInterval) } return "", err diff --git a/integration/tailscale.go b/integration/tailscale.go index c560c4fd..b69b217a 100644 --- a/integration/tailscale.go +++ b/integration/tailscale.go @@ -7,6 +7,7 @@ import ( "tailscale.com/ipn/ipnstate" ) +//nolint type TailscaleClient interface { Hostname() string Shutdown() error