mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-27 12:05:26 +00:00
add nolint to integrationtests, they are going away ™️
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
parent
dfadb965b7
commit
4df47de3f2
@ -1,3 +1,4 @@
|
|||||||
|
//nolint
|
||||||
package headscale
|
package headscale
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
//nolint
|
||||||
package headscale
|
package headscale
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@ -326,7 +327,6 @@ func GetEnvBool(key string) (bool, error) {
|
|||||||
func GetFirstOrCreateNetwork(pool *dockertest.Pool, name string) (dockertest.Network, error) {
|
func GetFirstOrCreateNetwork(pool *dockertest.Pool, name string) (dockertest.Network, error) {
|
||||||
networks, err := pool.NetworksByName(name)
|
networks, err := pool.NetworksByName(name)
|
||||||
if err != nil || len(networks) == 0 {
|
if err != nil || len(networks) == 0 {
|
||||||
|
|
||||||
if _, err := pool.CreateNetwork(name); err == nil {
|
if _, err := pool.CreateNetwork(name); err == nil {
|
||||||
// Create does not give us an updated version of the resource, so we need to
|
// Create does not give us an updated version of the resource, so we need to
|
||||||
// get it again.
|
// get it again.
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
//nolint
|
||||||
package headscale
|
package headscale
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@ -15,13 +16,12 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/ccding/go-stun/stun"
|
||||||
v1 "github.com/juanfont/headscale/gen/go/headscale/v1"
|
v1 "github.com/juanfont/headscale/gen/go/headscale/v1"
|
||||||
"github.com/ory/dockertest/v3"
|
"github.com/ory/dockertest/v3"
|
||||||
"github.com/ory/dockertest/v3/docker"
|
"github.com/ory/dockertest/v3/docker"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/suite"
|
"github.com/stretchr/testify/suite"
|
||||||
|
|
||||||
"github.com/ccding/go-stun/stun"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -122,7 +122,6 @@ func (s *IntegrationDERPTestSuite) SetupSuite() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
headscaleOptions := &dockertest.RunOptions{
|
headscaleOptions := &dockertest.RunOptions{
|
||||||
|
|
||||||
Name: headscaleDerpHostname,
|
Name: headscaleDerpHostname,
|
||||||
Mounts: []string{
|
Mounts: []string{
|
||||||
fmt.Sprintf(
|
fmt.Sprintf(
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
//nolint
|
||||||
package headscale
|
package headscale
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@ -506,7 +507,7 @@ func getIPsfromIPNstate(status ipnstate.Status) []netip.Addr {
|
|||||||
return ips
|
return ips
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Adopt test for cross communication between namespaces
|
// TODO: Adopt test for cross communication between namespaces.
|
||||||
func (s *IntegrationTestSuite) TestPingAllPeersByAddress() {
|
func (s *IntegrationTestSuite) TestPingAllPeersByAddress() {
|
||||||
for _, scales := range s.namespaces {
|
for _, scales := range s.namespaces {
|
||||||
ips, err := getIPs(scales.tailscales)
|
ips, err := getIPs(scales.tailscales)
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
//nolint
|
||||||
package headscale
|
package headscale
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@ -199,7 +200,7 @@ oidc:
|
|||||||
log.Println(config)
|
log.Println(config)
|
||||||
|
|
||||||
configPath := path.Join(currentPath, "integration_test/etc_oidc/config.yaml")
|
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 {
|
if err != nil {
|
||||||
s.FailNow(fmt.Sprintf("Could not write config: %s", err), "")
|
s.FailNow(fmt.Sprintf("Could not write config: %s", err), "")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user