Merge pull request #46198 from thaJeztah/libnetwork_nowindows_testfiles

libnetwork: rename and merge unix-only testfiles
This commit is contained in:
Bjorn Neergaard 2023-08-15 16:11:21 -06:00 committed by GitHub
commit dca7544320
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 1241 additions and 1262 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -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),

View file

@ -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)