Skip to content

Commit

Permalink
add nolint to integrationtests, they are going away ™️
Browse files Browse the repository at this point in the history
Signed-off-by: Kristoffer Dalby <[email protected]>
  • Loading branch information
kradalby committed Oct 18, 2022
1 parent dfadb96 commit 4df47de
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions integration_cli_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//nolint
package headscale

import (
Expand Down
2 changes: 1 addition & 1 deletion integration_common_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//nolint
package headscale

import (
Expand Down Expand Up @@ -326,7 +327,6 @@ func GetEnvBool(key string) (bool, error) {
func GetFirstOrCreateNetwork(pool *dockertest.Pool, name string) (dockertest.Network, error) {
networks, err := pool.NetworksByName(name)
if err != nil || len(networks) == 0 {

if _, err := pool.CreateNetwork(name); err == nil {
// Create does not give us an updated version of the resource, so we need to
// get it again.
Expand Down
5 changes: 2 additions & 3 deletions integration_embedded_derp_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//nolint
package headscale

import (
Expand All @@ -15,13 +16,12 @@ import (
"testing"
"time"

"github.com/ccding/go-stun/stun"
v1 "github.com/juanfont/headscale/gen/go/headscale/v1"
"github.com/ory/dockertest/v3"
"github.com/ory/dockertest/v3/docker"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"

"github.com/ccding/go-stun/stun"
)

const (
Expand Down Expand Up @@ -122,7 +122,6 @@ func (s *IntegrationDERPTestSuite) SetupSuite() {
}

headscaleOptions := &dockertest.RunOptions{

Name: headscaleDerpHostname,
Mounts: []string{
fmt.Sprintf(
Expand Down
3 changes: 2 additions & 1 deletion integration_general_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//nolint
package headscale

import (
Expand Down Expand Up @@ -506,7 +507,7 @@ func getIPsfromIPNstate(status ipnstate.Status) []netip.Addr {
return ips
}

// TODO: Adopt test for cross communication between namespaces
// TODO: Adopt test for cross communication between namespaces.
func (s *IntegrationTestSuite) TestPingAllPeersByAddress() {
for _, scales := range s.namespaces {
ips, err := getIPs(scales.tailscales)
Expand Down
3 changes: 2 additions & 1 deletion integration_oidc_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//nolint
package headscale

import (
Expand Down Expand Up @@ -199,7 +200,7 @@ oidc:
log.Println(config)

configPath := path.Join(currentPath, "integration_test/etc_oidc/config.yaml")
err = os.WriteFile(configPath, []byte(config), 0644)
err = os.WriteFile(configPath, []byte(config), 0o644)
if err != nil {
s.FailNow(fmt.Sprintf("Could not write config: %s", err), "")
}
Expand Down

0 comments on commit 4df47de

Please sign in to comment.