1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

12 commits

Author SHA1 Message Date
Brian Goff
b3c883bb2f Skip libnetwork integration tests on Windows
Most of these tests are making use of the bridge network and do not work
on Windows.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-06-02 16:53:29 +00:00
Brian Goff
4b981436fe Fixup libnetwork lint errors
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-06-01 23:48:32 +00:00
Brian Goff
a0a473125b Fix libnetwork imports
After moving libnetwork to this repo, we need to update all the import
paths for libnetwork to point to docker/docker/libnetwork instead of
docker/libnetwork.
This change implements that.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-06-01 21:51:23 +00:00
Sebastiaan van Stijn
3e1e9e878c vendor: gotest.tools v3.0.2
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-12 03:22:18 +02:00
Vincent Demeester
06d471d186 Migrate to gotest.tools :)
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-07-06 11:01:37 -07:00
Sebastiaan van Stijn
341845b5f2 ndots: produce error on negative numbers
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-06-29 01:22:17 +02:00
Sebastiaan van Stijn
b306706062 improve error message for invalid ndots number
instead of printing the whole option, print the _number_ only,
because that's what the error-message is pointing at;

Before this change:

    invalid number for ndots option ndots:foobar

After this change:

    invalid number for ndots option: foobar

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-06-29 01:19:34 +02:00
Sebastiaan van Stijn
6e260332e8 do not ignore user-provided "ndots:0" option
`ndots:0` is a valid DNS option; previously, `ndots:0` was
ignored, leading to the default (`ndots:0`) also being applied;

Before this change:

    docker network create foo
    docker run --rm --network foo --dns-opt ndots:0 alpine cat /etc/resolv.conf
    nameserver 127.0.0.11
    options ndots:0 ndots:0

After this change:

    docker network create foo
    docker run --rm --network foo --dns-opt ndots:0 alpine cat /etc/resolv.conf
    nameserver 127.0.0.11
    options ndots:0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-06-29 00:58:36 +02:00
Sebastiaan van Stijn
6e6ac3d2ac Remove redundant and faulty assert messages
The "message" argument in assert.Equal expects a format
string; the current string was not that, resulting in an
incorrect message being printed;

    --- FAIL: TestDNSOptions (1.28s)
            Location:       service_common_test.go:92
    	Error:  	Not equal: "ndots:5" (expected)
    			        != "ndots:0" (actual)
    	Messages:	The option must be ndots:5 instead:%!(EXTRA string=ndots:0)

This patch removes the message altogether, because assert.Equal
already prints enough information to catch the error;

    --- FAIL: TestDNSOptions (1.28s)
            Location:       service_common_test.go:92
    	Error:  	Not equal: "ndots:5" (expected)
    			        != "ndots:0" (actual)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-06-29 00:52:16 +02:00
Flavio Crisciani
5a658d4cc1 Fix user specified ndots option
Setting ndots to 0 does not allow to resolve search domains
The default will remain ndots:0 that will directly resolve
services, but if the user specify a different ndots value
just propagate it into the container

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2018-01-26 10:07:08 -08:00
Flavio Crisciani
e4f3bcb696 Add test for dns options
Validate that passing an option into the daemon config
does not corrupt the option set into the container resolv.conf

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-10-23 11:06:37 +02:00
Flavio Crisciani
aa81c6d265 Add test for cleanupServiceDiscovery
Unit test for the cleanupServiceDiscovery,
follow up of PR: #1985

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-10-19 13:36:29 +02:00