Commit Graph

196 Commits

Author SHA1 Message Date
Matthieu MOREL
6d737371b8 fix comparison rule from errorlint
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-06-13 08:26:56 +00:00
Rob Murray
6b9bd0a800 Merge pull request #50144 from thaJeztah/rm_import_aliases
all: remove redundant import-aliases for "go-winio"
2025-06-11 11:25:05 +01:00
Matthieu MOREL
bc9ec5fc02 fix emptyStringTest from go-critic
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-06-07 09:57:59 +02:00
Matthieu MOREL
469afa5f8f fix httpNoBody from go-critic
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-06-07 09:57:58 +02:00
Sebastiaan van Stijn
bd20bfdc41 all: remove redundant import-aliases for "go-winio"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-05 12:11:30 +02:00
Sebastiaan van Stijn
23009a700a testutil: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:16 +02:00
Paweł Gronowski
0e2cc22d36 Merge pull request #50049 from robmry/nftables_env_var_enable
nftables: enable using env var
2025-05-28 12:58:21 +00:00
Paweł Gronowski
e37efd4c2d Merge pull request #50068 from mmorel-35/github.com/containerd/errdefs
refactor: replace uses of errdefs package
2025-05-28 12:57:15 +00:00
Rob Murray
21a165de23 Use env-var DOCKER_FIREWALL_BACKEND=nftables to enable nftables
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-05-28 09:57:26 +01:00
Matthieu MOREL
08768e4d9d testutil: replace uses of errdefs package
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-05-28 05:41:39 +00:00
Rob Murray
e48ea1c6e0 Make integration tests ready for nftables
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-05-27 17:50:03 +01:00
Sebastiaan van Stijn
7148c6a5f5 Merge pull request #42300 from thaJeztah/carry_39384_remove_v2_schema1_push
Remove support for pulling v2 schema1
2025-05-21 23:43:41 +02:00
Sebastiaan van Stijn
0b1c7a8306 api/types: move ServiceUpdateOptions to api/types/swarm
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-19 16:30:33 +02:00
Sebastiaan van Stijn
31d62930f7 api/types: move ServiceCreateOptions to api/types/swarm
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-19 16:30:31 +02:00
Sebastiaan van Stijn
5ad0867236 api/types: move TaskListOptions to api/types/swarm
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-19 16:30:03 +02:00
Sebastiaan van Stijn
f008d85edc api/types: move NodeListOptions, NodeRemoveOptions to types/swarm
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-19 13:43:16 +02:00
Sebastiaan van Stijn
b13528522a api/types: move ServiceListOptions, ServiceInspectOptions to types/swarm
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-19 13:41:59 +02:00
Sebastiaan van Stijn
7937f0846c Merge pull request #50025 from thaJeztah/move_builder_options
api/types: move build-related types to api/types/build
2025-05-19 13:40:40 +02:00
Sebastiaan van Stijn
a411a39be0 api/types: move ConfigCreateResponse, ConfigListOptions to types/swarm
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-19 09:39:23 +02:00
Sebastiaan van Stijn
23117afca8 api/types: move SecretCreateResponse, SecretListOptions to types/swarm
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-19 09:36:48 +02:00
Sebastiaan van Stijn
3d1e4d9002 api/types: move build-related types to api/types/build
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-19 09:30:27 +02:00
Paweł Gronowski
4b9f0707a0 Merge pull request #50017 from thaJeztah/align_go_build_versions
align //go:build versions
2025-05-16 19:00:44 +00:00
Sebastiaan van Stijn
7130cd4f16 Remove DockerSchema1RegistrySuite schema 2 version 1 tests
Also remove the DOCKER_ALLOW_SCHEMA1_PUSH_DONOTUSE from Jenkins

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-16 18:00:06 +02:00
Sebastiaan van Stijn
2a96d2eb8d align //go:build versions
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-16 17:52:43 +02:00
Paweł Gronowski
b70b496505 testutil/daemon: Don't use devcontainers daemon.json
Prevent the daemon spawned for integration tests from sourcing the
daemon configuration intended interactive dev shell usage.

Before this change, integration tests would fail to create a daemon
with different configuration provided via cli flags (like `--feature`)
if they're already specified in the default daemon.json.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-05-16 17:03:26 +02:00
Sebastiaan van Stijn
72a11b84d4 testutil/fakestorage: use t.TempDir
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-12 12:05:50 +02:00
Sebastiaan van Stijn
986988a394 testutil/daemon: Daemon.StopWithError: rename output-var to prevent shadowing
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-08 14:33:11 +02:00
Sebastiaan van Stijn
3606712e2d testutil: remove named returns
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-08 14:33:11 +02:00
Matthieu MOREL
b0711d5fe9 fix(QF1001): Apply De Morgan’s law
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-01 14:16:44 +02:00
Rob Murray
59920a733f Merge pull request #49823 from robmry/integration_test_bridge_addrs
Reset default bridge addresses after integration tests
2025-04-23 14:45:02 +01:00
Sebastiaan van Stijn
7c52c4d92e update go:build tags to go1.23 to align with vendor.mod
Go maintainers started to unconditionally update the minimum go version
for golang.org/x/ dependencies to go1.23, which means that we'll no longer
be able to support any version below that when updating those dependencies;

> all: upgrade go directive to at least 1.23.0 [generated]
>
> By now Go 1.24.0 has been released, and Go 1.22 is no longer supported
> per the Go Release Policy (https://go.dev/doc/devel/release#policy).
>
> For golang/go#69095.

This updates our minimum version to go1.23, as we won't be able to maintain
compatibility with older versions because of the above.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-04-17 15:43:19 +02:00
Rob Murray
6083fad7df Reset default bridge addresses after integration tests
CI runs a docker daemon, and some tests run their own. That tramples
the CI daemon's default bridge.

If a test leaves the bridge with only a link-local IPv6 address (for
example), subsequent tests are likely to fail - even if they also
start their own daemon because, by default the default bridge
network's config is based on an existing bridge device.

So, remember the bridge's addresses at the start of each test, and
restore them afterwards.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-04-16 22:50:19 +01:00
Derek McGowan
d0154d3e59 Update to use github.com/moby/go-archive
Update use of idtools to moby/user for archive and other deprecated uses

Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-04-08 17:35:05 -07:00
Rob Murray
c3fa7c1779 Test that firewalld reload doesn't re-create deleted iptables rules
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-04-08 10:27:35 +01:00
Rob Murray
a0a86d0982 Add Info.FirewallBackend
Report FirewallBackend in "docker info".

It's currently "iptables" or "iptables+firewalld" on Linux, and
omitted on Windows.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-04-07 16:56:49 +01:00
Paweł Gronowski
19a0f886da testutil: Update to any from interface{}
Only files that have go build version enforcing tag

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-03-25 13:42:53 +01:00
Akihiro Suda
41fe41382e Merge pull request #49559 from thaJeztah/testutil_remove_isErrNotFoundSwarmClassic
testutil: remove isErrNotFoundSwarmClassic
2025-03-04 17:45:15 +09:00
Sebastiaan van Stijn
aa9817b0c5 testutil: remove isErrNotFoundSwarmClassic
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-02-27 22:03:08 +01:00
Sebastiaan van Stijn
0ab7d41f9e testutil/environment: Execution.Clean: remove redundant condition
It's either "not windows" or "windows" (and something else), so the second
condition doesn't have to check if it's windows.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-02-27 21:59:05 +01:00
Rob Murray
ab7305c85a Check swarm's jump to DOCKER-INGRESS
Related to commit 558da63 (Jump to DOCKER-INGRESS from
DOCKER-FORWARD).

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-02-26 14:27:57 +00:00
Paweł Gronowski
b9319f64ed client: Change ImageSave to use functional options
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-02-14 14:25:39 +01:00
Paweł Gronowski
ae4c688fd8 client: Change ImageLoad to use functional options
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-02-14 14:25:37 +01:00
Paweł Gronowski
9e77d05967 add //go:build directives to prevent downgrading to go1.16 language
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-02-06 18:16:59 +01:00
Paweł Gronowski
a096045678 all: Replace deprecated ImageInspectWithRaw usage
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-02-06 13:31:48 +01:00
Laurent Goderre
1126d477fd Add live-restore tests for mount image
Signed-off-by: Laurent Goderre <laurent.goderre@docker.com>
2025-02-04 21:32:04 -05:00
Rob Murray
22c02219de Bridge: on network delete, make sure it's deleted from store
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-01-17 21:56:02 +00:00
Sebastiaan van Stijn
cc120c4c05 testutil: update to semconv v1.26.0
update the version to align with BuildKit's [util/tracing/detect], which
was updated to v1.26.0 in 48b237f7af

[util/tracing/detect]:  2b7e859c49/vendor/github.com/moby/buildkit/util/tracing/detect/resource.go (L15)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-14 19:21:16 +01:00
Rob Murray
a079f62f47 Add testutil daemon.WithResolvConf
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-01-03 12:37:00 +00:00
Sebastiaan van Stijn
72ebf2c309 testutil: use lazyregexp to compile regexes on first use
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-02 21:37:34 +01:00
Paweł Gronowski
4847557d1b otel: Avoid excessive memory allocations if not configured
Use noop tracer provider if the OTEL exporter is not configured.
This makes the OTEL tracing avoid doing unneeded memory allocations for
spans which aren't going to be exported anywhere anyway.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-12-12 18:31:03 +01:00