summaryrefslogtreecommitdiff
path: root/integration-cli/fixtures_linux_daemon_test.go
Commit message (Collapse)AuthorAgeFilesLines
* refactor: move from io/ioutil to io and os packageEng Zer Jun2021-08-271-5/+4
| | | | | | | | The io/ioutil package has been deprecated in Go 1.16. This commit replaces the existing io/ioutil functions with their new definitions in io and os packages. Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
* Dockerfile: frozen images: update to bullseye, remove buildpack-depSebastiaan van Stijn2021-08-201-4/+4
| | | | | | | | | | | | | | | | | | | | | | Update the frozen images to also be based on Debian bullseye. Using the "slim" variant (which looks to have all we're currently using), and remove the buildpack-dep frozen image. The buildpack-dep image is quite large, and it looks like we only use it to compile some C binaries, which should work fine on a regular debian image; docker build -t debian:bullseye-slim-gcc -<<EOF FROM debian:bullseye-slim RUN apt-get update && apt-get install -y gcc libc6-dev --no-install-recommends EOF docker image ls REPOSITORY TAG IMAGE ID CREATED SIZE debian bullseye-slim-gcc 1851750242af About a minute ago 255MB buildpack-deps bullseye fe8fece98de2 2 days ago 834MB Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Move use of debian:buster frozen image to debian:bullseyeEric Mountain2020-12-191-2/+2
| | | | Signed-off-by: Eric Mountain <eric.mountain@datadoghq.com>
* Upgrading the versions of images in Dockerfile.wanghuaiqing2020-06-301-4/+4
| | | | | | | | | | | | | | | In order to run tests at mips64el device. Now official-images has supported the following images for mips64el. buildpack-deps:stretch buildpack-deps:buster debian:stretch debian:buster But official-images does not support the following images for mips64el. debian:jessie buildpack-deps:jessie Signed-off-by: wanghuaiqing <wanghuaiqing@loongson.cn>
* bump gotest.tools v3.0.1 for compatibility with Go 1.14Sebastiaan van Stijn2020-02-111-1/+1
| | | | | | full diff: https://github.com/gotestyourself/gotest.tools/compare/v2.3.0...v3.0.1 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* integration-cli: remove unused functions and enable disabled testsSebastiaan van Stijn2019-09-181-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ``` 14:26:43 integration-cli/docker_cli_pull_local_test.go:64:6: U1000: func `testConcurrentPullWholeRepo` is unused (unused) 14:26:43 func testConcurrentPullWholeRepo(c *check.C) { 14:26:43 ^ 14:26:43 integration-cli/docker_cli_pull_local_test.go:111:31: U1000: func `(*DockerRegistrySuite).testConcurrentPullWholeRepo` is unused (unused) 14:26:43 func (s *DockerRegistrySuite) testConcurrentPullWholeRepo(c *check.C) { 14:26:43 ^ 14:26:43 integration-cli/docker_cli_pull_local_test.go:115:38: U1000: func `(*DockerSchema1RegistrySuite).testConcurrentPullWholeRepo` is unused (unused) 14:26:43 func (s *DockerSchema1RegistrySuite) testConcurrentPullWholeRepo(c *check.C) { 14:26:43 ^ 14:26:43 integration-cli/docker_cli_pull_local_test.go:120:6: U1000: func `testConcurrentFailingPull` is unused (unused) 14:26:43 func testConcurrentFailingPull(c *check.C) { 14:26:43 ^ 14:26:43 integration-cli/docker_cli_pull_local_test.go:142:31: U1000: func `(*DockerRegistrySuite).testConcurrentFailingPull` is unused (unused) 14:26:43 func (s *DockerRegistrySuite) testConcurrentFailingPull(c *check.C) { 14:26:43 ^ 14:26:43 integration-cli/docker_cli_pull_local_test.go:146:38: U1000: func `(*DockerSchema1RegistrySuite).testConcurrentFailingPull` is unused (unused) 14:26:43 func (s *DockerSchema1RegistrySuite) testConcurrentFailingPull(c *check.C) { 14:26:43 integration-cli/docker_utils_test.go:170:6: U1000: func `inspectImage` is unused (unused) 14:26:43 func inspectImage(c *check.C, name, filter string) string { 14:26:43 ^ 14:26:43 integration-cli/events_utils_test.go:196:6: U1000: func `parseEventsWithID` is unused (unused) 14:26:43 func parseEventsWithID(c *check.C, out, match, id string) { 14:26:43 ^ 14:26:43 integration-cli/fixtures_linux_daemon_test.go:17:6: U1000: type `testingT` is unused (unused) 14:26:43 type testingT interface { 14:26:43 ^ 14:26:43 integration-cli/fixtures_linux_daemon_test.go:19:2: U1000: func `testingT.Fatalf` is unused (unused) 14:26:43 Fatalf(string, ...interface{}) 14:26:43 ^ 14:26:43 integration-cli/fixtures_linux_daemon_test.go:22:6: U1000: type `logT` is unused (unused) 14:26:43 type logT interface { 14:26:43 ^ 14:26:43 integration-cli/fixtures_linux_daemon_test.go:23:2: U1000: func `logT.Logf` is unused (unused) 14:26:43 Logf(string, ...interface{}) ``` Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* integration-cli: fix incorrect permissions (staticcheck)Sebastiaan van Stijn2019-09-181-2/+2
| | | | | | | | | | | | | | ``` 13:06:14 integration-cli/docker_api_containers_test.go:1983:72: SA9002: file mode '666' evaluates to 01232; did you mean '0666'? (staticcheck) 13:06:14 err = ioutil.WriteFile(filepath.Join(tmpDir, "bar"), []byte("hello"), 666) 13:06:14 integration-cli/fixtures_linux_daemon_test.go:64:46: SA9002: file mode '600' evaluates to 01130; did you mean '0600'? (staticcheck) 13:06:14 err = ioutil.WriteFile(dockerFile, content, 600) 13:06:14 ^ 13:06:14 integration-cli/fixtures_linux_daemon_test.go:119:54: SA9002: file mode '600' evaluates to 01130; did you mean '0600'? (staticcheck) 13:06:14 err = ioutil.WriteFile(dockerfile, []byte(content), 600) ``` Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* testutil: make testing packages publicSam Whited2019-09-111-1/+1
| | | | | | | | | | | | | | | | This was done with something along the lines of: ``` mv internal/test testutil pushd testutil/; grep -IRl "package test" | xargs -I '{}' sed -i -e 's|package test|package testutil|g' {}; popd mv internal/testutil/*.go testutil/ && rm -rf internal/ grep -IRl "github.com\/docker\/docker\/internal\/test" | xargs -I '{}' sed -i -e 's|github.com/docker/docker/internal/test|github.com/docker/docker/test|g' {} goimports . ``` I also modified the basic plugin path in testutil/fixtures/plugin. Signed-off-by: Sam Whited <sam@samwhited.com>
* rm-gocheck: run goimports to compile successfullyTibor Vass2019-09-091-1/+1
| | | | | | | | | | goimports -w \ -- "./integration-cli/daemon" "./pkg/discovery" "./pkg/discovery/file" "./pkg/discovery/kv" "./pkg/discovery/memory" "./pkg/discovery/nodes" "./integration-cli" \ && \ gofmt -w -s \ -- "./integration-cli/daemon" "./pkg/discovery" "./pkg/discovery/file" "./pkg/discovery/kv" "./pkg/discovery/memory" "./pkg/discovery/nodes" "./integration-cli" Signed-off-by: Tibor Vass <tibor@docker.com>
* rm-gocheck: check.C -> testing.TTibor Vass2019-09-091-4/+4
| | | | | | | sed -E -i 's#\bcheck\.C\b#testing.T#g' \ -- "integration-cli/check_test.go" "integration-cli/daemon/daemon.go" "integration-cli/daemon/daemon_swarm.go" "integration-cli/daemon_swarm_hack_test.go" "integration-cli/docker_api_attach_test.go" "integration-cli/docker_api_build_test.go" "integration-cli/docker_api_build_windows_test.go" "integration-cli/docker_api_containers_test.go" "integration-cli/docker_api_containers_windows_test.go" "integration-cli/docker_api_exec_resize_test.go" "integration-cli/docker_api_exec_test.go" "integration-cli/docker_api_images_test.go" "integration-cli/docker_api_inspect_test.go" "integration-cli/docker_api_logs_test.go" "integration-cli/docker_api_network_test.go" "integration-cli/docker_api_stats_test.go" "integration-cli/docker_api_swarm_node_test.go" "integration-cli/docker_api_swarm_service_test.go" "integration-cli/docker_api_swarm_test.go" "integration-cli/docker_api_test.go" "integration-cli/docker_cli_attach_test.go" "integration-cli/docker_cli_attach_unix_test.go" "integration-cli/docker_cli_build_test.go" "integration-cli/docker_cli_build_unix_test.go" "integration-cli/docker_cli_by_digest_test.go" "integration-cli/docker_cli_commit_test.go" "integration-cli/docker_cli_cp_from_container_test.go" "integration-cli/docker_cli_cp_test.go" "integration-cli/docker_cli_cp_to_container_test.go" "integration-cli/docker_cli_cp_to_container_unix_test.go" "integration-cli/docker_cli_cp_utils_test.go" "integration-cli/docker_cli_create_test.go" "integration-cli/docker_cli_daemon_plugins_test.go" "integration-cli/docker_cli_daemon_test.go" "integration-cli/docker_cli_events_test.go" "integration-cli/docker_cli_events_unix_test.go" "integration-cli/docker_cli_exec_test.go" "integration-cli/docker_cli_exec_unix_test.go" "integration-cli/docker_cli_external_volume_driver_unix_test.go" "integration-cli/docker_cli_health_test.go" "integration-cli/docker_cli_history_test.go" "integration-cli/docker_cli_images_test.go" "integration-cli/docker_cli_import_test.go" "integration-cli/docker_cli_info_test.go" "integration-cli/docker_cli_info_unix_test.go" "integration-cli/docker_cli_inspect_test.go" "integration-cli/docker_cli_links_test.go" "integration-cli/docker_cli_login_test.go" "integration-cli/docker_cli_logout_test.go" "integration-cli/docker_cli_logs_test.go" "integration-cli/docker_cli_netmode_test.go" "integration-cli/docker_cli_network_unix_test.go" "integration-cli/docker_cli_plugins_logdriver_test.go" "integration-cli/docker_cli_plugins_test.go" "integration-cli/docker_cli_port_test.go" "integration-cli/docker_cli_proxy_test.go" "integration-cli/docker_cli_prune_unix_test.go" "integration-cli/docker_cli_ps_test.go" "integration-cli/docker_cli_pull_local_test.go" "integration-cli/docker_cli_pull_test.go" "integration-cli/docker_cli_push_test.go" "integration-cli/docker_cli_registry_user_agent_test.go" "integration-cli/docker_cli_restart_test.go" "integration-cli/docker_cli_rmi_test.go" "integration-cli/docker_cli_run_test.go" "integration-cli/docker_cli_run_unix_test.go" "integration-cli/docker_cli_save_load_test.go" "integration-cli/docker_cli_save_load_unix_test.go" "integration-cli/docker_cli_search_test.go" "integration-cli/docker_cli_service_create_test.go" "integration-cli/docker_cli_service_health_test.go" "integration-cli/docker_cli_service_logs_test.go" "integration-cli/docker_cli_service_scale_test.go" "integration-cli/docker_cli_sni_test.go" "integration-cli/docker_cli_start_test.go" "integration-cli/docker_cli_stats_test.go" "integration-cli/docker_cli_swarm_test.go" "integration-cli/docker_cli_swarm_unix_test.go" "integration-cli/docker_cli_top_test.go" "integration-cli/docker_cli_update_unix_test.go" "integration-cli/docker_cli_userns_test.go" "integration-cli/docker_cli_v2_only_test.go" "integration-cli/docker_cli_volume_test.go" "integration-cli/docker_deprecated_api_v124_test.go" "integration-cli/docker_deprecated_api_v124_unix_test.go" "integration-cli/docker_hub_pull_suite_test.go" "integration-cli/docker_utils_test.go" "integration-cli/events_utils_test.go" "integration-cli/fixtures_linux_daemon_test.go" "integration-cli/utils_test.go" "pkg/discovery/discovery_test.go" "pkg/discovery/file/file_test.go" "pkg/discovery/generator_test.go" "pkg/discovery/kv/kv_test.go" "pkg/discovery/memory/memory_test.go" "pkg/discovery/nodes/nodes_test.go" Signed-off-by: Tibor Vass <tibor@docker.com>
* Replace some checkers and assertions with gotest.toolsSebastiaan van Stijn2019-04-051-12/+12
| | | | Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* integration-cli: don't build -test images if they already existAleksa Sarai2019-03-131-9/+12
| | | | | | | | | | | | | | | | There's no need to try to re-build the test images if they already exist. This change makes basically no difference to the upstream integration test-suite running, but for users who want to run the integration-cli suite on a host machine (such as distributions doing tests) this change allows images to be pre-loaded such that compilers aren't needed on the test machine. However, this does remove the accidental re-compilation of nnp-test, as well as handling errors far more cleanly (previously if an error occurred during a test build, further tests won't attempt to rebuild it). Signed-off-by: Aleksa Sarai <asarai@suse.de>
* Clean some integration-cli/fixtures package/filesVincent Demeester2018-04-161-1/+1
| | | | | | | | | - Move go package used by both `integration-cli` and `integration` to `internal/test/fixtures`. - Remove fixtures that are not used anymore (moved to `docker/cli` a while ago) : deploy, notary, secrets. Signed-off-by: Vincent Demeester <vincent@sbr.pm>
* Remove deprecated environment.DaemonPlatform()Sebastiaan van Stijn2018-01-151-2/+2
| | | | Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* TestRunSeccompProfileAllow32Bit: fixKir Kolyshkin2017-09-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Since the update to Debian Stretch, this test fails. The reason is dynamic binary, which requires i386 ld.so for loading (and apparently it is no longer installed by default): > root@09d4b173c3dc:/go/src/github.com/docker/docker# file exit32-test > exit32-test: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, BuildID[sha1]=a0d3d6cb59788453b983f65f8dc6ac52920147b6, stripped > root@09d4b173c3dc:/go/src/github.com/docker/docker# ls -l /lib/ld-linux.so.2 > ls: cannot access '/lib/ld-linux.so.2': No such file or directory To fix, just add -static. Interestingly, ldd can'f figure it out. > root@a324f8edfcaa:/go/src/github.com/docker/docker# ldd exit32-test > not a dynamic executable Other tools (e.g. objdump) also show it's a dynamic binary. While at it, remove the extra "id" argument (a copy-paste error I guess). Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
* Refactor test environmentDaniel Nephin2017-08-301-2/+2
| | | | | | | | split all non-cli portions into a new internal/test/environment package Set a test environment on packages instead of creating new ones. Signed-off-by: Daniel Nephin <dnephin@docker.com>
* Protect images in the integration/ suiteDaniel Nephin2017-08-091-10/+0
| | | | Signed-off-by: Daniel Nephin <dnephin@docker.com>
* Revert "Block obsolete socket families in the default seccomp profile"Justin Cormack2017-05-091-1/+1
| | | | | | | | | | | | | | This reverts commit 7e3a596a63fd8d0ab958132901b6ded81f8b44c0. Unfortunately, it was pointed out in https://github.com/moby/moby/pull/29076#commitcomment-21831387 that the `socketcall` syscall takes a pointer to a struct so it is not possible to use seccomp profiles to filter it. This means these cannot be blocked as you can use `socketcall` to call them regardless, as we currently allow 32 bit syscalls. Users who wish to block these should use a seccomp profile that blocks all 32 bit syscalls and then just block the non socketcall versions. Signed-off-by: Justin Cormack <justin.cormack@docker.com>
* Move TearDownTest cleaning to environment packageVincent Demeester2017-03-011-5/+3
| | | | Signed-off-by: Vincent Demeester <vincent@sbr.pm>
* Block obsolete socket families in the default seccomp profileJustin Cormack2017-01-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Linux supports many obsolete address families, which are usually available in common distro kernels, but they are less likely to be properly audited and may have security issues This blocks all socket families in the socket (and socketcall where applicable) syscall except - AF_UNIX - Unix domain sockets - AF_INET - IPv4 - AF_INET6 - IPv6 - AF_NETLINK - Netlink sockets for communicating with the ekrnel - AF_PACKET - raw sockets, which are only allowed with CAP_NET_RAW All other socket families are blocked, including Appletalk (native, not over IP), IPX (remember that!), VSOCK and HVSOCK, which should not generally be used in containers, etc. Note that users can of course provide a profile per container or in the daemon config if they have unusual use cases that require these. Signed-off-by: Justin Cormack <justin.cormack@docker.com>
* Use testEnv methods and remove most of the global variablesVincent Demeester2017-01-171-2/+2
| | | | Signed-off-by: Vincent Demeester <vincent@sbr.pm>
* Remove pkg/integration and move it to testutil or integration-cliVincent Demeester2016-12-301-1/+1
| | | | Signed-off-by: Vincent Demeester <vincent@sbr.pm>
* Introduce a environment package in integration-cliVincent Demeester2016-12-291-0/+151
Signed-off-by: Vincent Demeester <vincent@sbr.pm>