[ipvs] Add tests for get/set timeout
Signed-off-by: Laurent Bernaille <laurent.bernaille@datadoghq.com>
This commit is contained in:
parent
7374284841
commit
8e650a9685
1 changed files with 22 additions and 0 deletions
|
@ -6,6 +6,7 @@ import (
|
|||
"net"
|
||||
"syscall"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/docker/libnetwork/testutils"
|
||||
"github.com/vishvananda/netlink"
|
||||
|
@ -342,3 +343,24 @@ func TestDestination(t *testing.T) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestTimeouts(t *testing.T) {
|
||||
if testutils.RunningOnCircleCI() {
|
||||
t.Skip("Skipping as not supported on CIRCLE CI kernel")
|
||||
}
|
||||
defer testutils.SetupTestOSContext(t)()
|
||||
|
||||
i, err := New("")
|
||||
assert.NilError(t, err)
|
||||
|
||||
_, err = i.GetConfig()
|
||||
assert.NilError(t, err)
|
||||
|
||||
cfg := Config{66 * time.Second, 66 * time.Second, 66 * time.Second}
|
||||
err = i.SetConfig(&cfg)
|
||||
assert.NilError(t, err)
|
||||
|
||||
c2, err := i.GetConfig()
|
||||
assert.NilError(t, err)
|
||||
assert.DeepEqual(t, cfg, *c2)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue