mirror of
https://github.com/netbirdio/netbird.git
synced 2025-08-09 07:15:15 +02:00
[client] Feat: Support Multiple Profiles (#3980)
[client] Feat: Support Multiple Profiles (#3980)
This commit is contained in:
@ -38,6 +38,7 @@ import (
|
||||
"github.com/netbirdio/netbird/client/internal/peer"
|
||||
"github.com/netbirdio/netbird/client/internal/peer/guard"
|
||||
icemaker "github.com/netbirdio/netbird/client/internal/peer/ice"
|
||||
"github.com/netbirdio/netbird/client/internal/profilemanager"
|
||||
"github.com/netbirdio/netbird/client/internal/routemanager"
|
||||
"github.com/netbirdio/netbird/client/ssh"
|
||||
"github.com/netbirdio/netbird/client/system"
|
||||
@ -1149,25 +1150,25 @@ func Test_ParseNATExternalIPMappings(t *testing.T) {
|
||||
}{
|
||||
{
|
||||
name: "Parse Valid List Should Be OK",
|
||||
inputBlacklistInterface: defaultInterfaceBlacklist,
|
||||
inputBlacklistInterface: profilemanager.DefaultInterfaceBlacklist,
|
||||
inputMapList: []string{"1.1.1.1", "8.8.8.8/" + testingInterface},
|
||||
expectedOutput: []string{"1.1.1.1", "8.8.8.8/" + testingIP},
|
||||
},
|
||||
{
|
||||
name: "Only Interface name Should Return Nil",
|
||||
inputBlacklistInterface: defaultInterfaceBlacklist,
|
||||
inputBlacklistInterface: profilemanager.DefaultInterfaceBlacklist,
|
||||
inputMapList: []string{testingInterface},
|
||||
expectedOutput: nil,
|
||||
},
|
||||
{
|
||||
name: "Invalid IP Return Nil",
|
||||
inputBlacklistInterface: defaultInterfaceBlacklist,
|
||||
inputBlacklistInterface: profilemanager.DefaultInterfaceBlacklist,
|
||||
inputMapList: []string{"1.1.1.1000"},
|
||||
expectedOutput: nil,
|
||||
},
|
||||
{
|
||||
name: "Invalid Mapping Element Should return Nil",
|
||||
inputBlacklistInterface: defaultInterfaceBlacklist,
|
||||
inputBlacklistInterface: profilemanager.DefaultInterfaceBlacklist,
|
||||
inputMapList: []string{"1.1.1.1/10.10.10.1/eth0"},
|
||||
expectedOutput: nil,
|
||||
},
|
||||
|
Reference in New Issue
Block a user