libnetwork: rename unix-only testfiles
Some tests were implicitly skipped through the `getTestEnv()` utility, which made it hard to discover they were not ran on Windows. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
a9e8110fe3
commit
c0562d4eed
3 changed files with 4 additions and 8 deletions
|
@ -1,7 +1,8 @@
|
|||
//go:build !windows
|
||||
|
||||
package libnetwork
|
||||
|
||||
import (
|
||||
"runtime"
|
||||
"strconv"
|
||||
"testing"
|
||||
|
||||
|
@ -11,12 +12,9 @@ import (
|
|||
"github.com/docker/docker/libnetwork/netlabel"
|
||||
"github.com/docker/docker/libnetwork/options"
|
||||
"github.com/docker/docker/libnetwork/osl"
|
||||
"gotest.tools/v3/skip"
|
||||
)
|
||||
|
||||
func getTestEnv(t *testing.T, opts ...[]NetworkOption) (*Controller, []*Network) {
|
||||
skip.If(t, runtime.GOOS == "windows", "test only works on linux")
|
||||
|
||||
const netType = "bridge"
|
||||
c, err := New(
|
||||
OptionBoltdbWithRandomDBFile(t),
|
|
@ -1,18 +1,16 @@
|
|||
//go:build !windows
|
||||
|
||||
package libnetwork
|
||||
|
||||
import (
|
||||
"net"
|
||||
"runtime"
|
||||
"testing"
|
||||
|
||||
"github.com/docker/docker/internal/testutils/netnsutils"
|
||||
"gotest.tools/v3/assert"
|
||||
"gotest.tools/v3/skip"
|
||||
)
|
||||
|
||||
func TestCleanupServiceDiscovery(t *testing.T) {
|
||||
skip.If(t, runtime.GOOS == "windows", "test only works on linux")
|
||||
|
||||
defer netnsutils.SetupTestOSContext(t)()
|
||||
c, err := New()
|
||||
assert.NilError(t, err)
|
Loading…
Reference in a new issue