chore(wireguard): fix netlink integration test
- Broken since recent commit 9d1a0b60a2
This commit is contained in:
@@ -57,7 +57,9 @@ func Test_netlink_Wireguard_addAddresses(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
// Success
|
||||
const addIterations = 2 // initial + replace
|
||||
|
||||
for i := 0; i < addIterations; i++ {
|
||||
err = wg.addAddresses(link, addresses)
|
||||
require.NoError(t, err)
|
||||
|
||||
@@ -70,11 +72,7 @@ func Test_netlink_Wireguard_addAddresses(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, addresses[i], ipNet)
|
||||
}
|
||||
|
||||
// Existing address cannot be added
|
||||
err = wg.addAddresses(link, addresses)
|
||||
require.Error(t, err)
|
||||
assert.EqualError(t, err, "file exists: when adding address 1.2.3.4/32 to link test_8081")
|
||||
}
|
||||
}
|
||||
|
||||
func Test_netlink_Wireguard_addRule(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user