Skip to content

Commit

Permalink
Fix import cycle in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pulsastrix committed Mar 8, 2024
1 parent 23204c7 commit 541740b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions client/firewall/nftables/manager_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package nftables
import (
"context"
"fmt"
"github.com/netbirdio/netbird/client/firewall"
"net"
"net/netip"
"testing"
Expand Down Expand Up @@ -162,7 +161,7 @@ func TestNftablesManager(t *testing.T) {

func TestNftablesManager6(t *testing.T) {

if !iface.SupportsIPv6() || !firewall.SupportsIPv6() {
if !iface.SupportsIPv6() {
t.Skip("Environment does not support IPv6, skipping IPv6 test...")
}
mock := &iFaceMock{
Expand Down
3 changes: 1 addition & 2 deletions client/firewall/nftables/router_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"github.com/google/nftables/expr"
"github.com/stretchr/testify/require"

fw "github.com/netbirdio/netbird/client/firewall"
firewall "github.com/netbirdio/netbird/client/firewall/manager"
"github.com/netbirdio/netbird/client/firewall/test"
)
Expand Down Expand Up @@ -282,7 +281,7 @@ func createWorkTables() (*nftables.Table, *nftables.Table, error) {

table := sConn.AddTable(&nftables.Table{Name: tableName, Family: nftables.TableFamilyIPv4})
var table6 *nftables.Table
if iface.SupportsIPv6() && fw.SupportsIPv6() {
if iface.SupportsIPv6() {
table6 = sConn.AddTable(&nftables.Table{Name: tableName, Family: nftables.TableFamilyIPv6})
}
err = sConn.Flush()
Expand Down

0 comments on commit 541740b

Please sign in to comment.