summaryrefslogtreecommitdiff
path: root/integration/plugin/graphdriver
Commit message (Collapse)AuthorAgeFilesLines
* [chore] clean up reexec.Init() callsCory Snider2023-05-091-5/+0
| | | | | | | | | | | | | | | | | Now that most uses of reexec have been replaced with non-reexec solutions, most of the reexec.Init() calls peppered throughout the test suites are unnecessary. Furthermore, most of the reexec.Init() calls in test code neglects to check the return value to determine whether to exit, which would result in the reexec'ed subprocesses proceeding to run the tests, which would reexec another subprocess which would proceed to run the tests, recursively. (That would explain why every reexec callback used to unconditionally call os.Exit() instead of returning...) Remove unneeded reexec.Init() calls from test and example code which no longer needs it, and fix the reexec.Init() calls which are not inert to exit after a reexec callback is invoked. Signed-off-by: Cory Snider <csnider@mirantis.com>
* api/types/container: create type for changes endpointSebastiaan van Stijn2023-05-031-2/+2
| | | | Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* integration/plugin: remove deprecated overlay2.override_kernel_checkSebastiaan van Stijn2022-10-101-1/+1
| | | | | | It's no longer used since e226aea280efdc18f887e853b5eefd763b602937 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* chore(integration): delete outdated TODO commentCory Snider2022-09-231-1/+0
| | | | | | | | | The TODO comment was in regards to allowing graphdriver plugins to provide their own ContainerFS implementations. The ContainerFS interface has been removed from Moby, so there is no longer anything which needs to be figured out. Signed-off-by: Cory Snider <csnider@mirantis.com>
* pkg/containerfs: alias ContainerFS to stringCory Snider2022-09-231-1/+1
| | | | | | Drop the constructor and redundant string() type-casts. Signed-off-by: Cory Snider <csnider@mirantis.com>
* pkg/containerfs: simplify ContainerFS typeCory Snider2022-09-231-1/+1
| | | | | | Iterate towards dropping the type entirely. Signed-off-by: Cory Snider <csnider@mirantis.com>
* Finish refactor of UID/GID usage to a new structCory Snider2022-03-141-2/+3
| | | | | | | | | | | | | | | | | | | | | | Finish the refactor which was partially completed with commit 34536c498d56, passing around IdentityMapping structs instead of pairs of []IDMap slices. Existing code which uses []IDMap relies on zero-valued fields to be valid, empty mappings. So in order to successfully finish the refactoring without introducing bugs, their replacement therefore also needs to have a useful zero value which represents an empty mapping. Change IdentityMapping to be a pass-by-value type so that there are no nil pointers to worry about. The functionality provided by the deprecated NewIDMappingsFromMaps function is required by unit tests to to construct arbitrary IdentityMapping values. And the daemon will always need to access the mappings to pass them to the Linux kernel. Accommodate these use cases by exporting the struct fields instead. BuildKit currently depends on the UIDs and GIDs methods so we cannot get rid of them yet. Signed-off-by: Cory Snider <csnider@mirantis.com>
* 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>
* gosimple: S1039: unnecessary use of fmt.SprintfSebastiaan van Stijn2021-06-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pkg/devicemapper/devmapper.go:383:28: S1039: unnecessary use of fmt.Sprintf (gosimple) if err := task.setMessage(fmt.Sprintf("@cancel_deferred_remove")); err != nil { ^ integration/plugin/graphdriver/external_test.go:321:18: S1039: unnecessary use of fmt.Sprintf (gosimple) http.Error(w, fmt.Sprintf("missing id"), 409) ^ integration-cli/docker_api_stats_test.go:70:31: S1039: unnecessary use of fmt.Sprintf (gosimple) _, body, err := request.Get(fmt.Sprintf("/info")) ^ integration-cli/docker_cli_build_test.go:4547:19: S1039: unnecessary use of fmt.Sprintf (gosimple) "--build-arg", fmt.Sprintf("FOO1=fromcmd"), ^ integration-cli/docker_cli_build_test.go:4548:19: S1039: unnecessary use of fmt.Sprintf (gosimple) "--build-arg", fmt.Sprintf("FOO2="), ^ integration-cli/docker_cli_build_test.go:4549:19: S1039: unnecessary use of fmt.Sprintf (gosimple) "--build-arg", fmt.Sprintf("FOO3"), // set in env ^ integration-cli/docker_cli_build_test.go:4668:32: S1039: unnecessary use of fmt.Sprintf (gosimple) cli.WithFlags("--build-arg", fmt.Sprintf("tag=latest"))) ^ integration-cli/docker_cli_build_test.go:4690:32: S1039: unnecessary use of fmt.Sprintf (gosimple) cli.WithFlags("--build-arg", fmt.Sprintf("baz=abc"))) ^ pkg/jsonmessage/jsonmessage_test.go:255:4: S1039: unnecessary use of fmt.Sprintf (gosimple) fmt.Sprintf("ID: status\n"), ^ Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* fix integration test case TestExternalGraphDriver failed in mips archlimeidan2020-09-151-2/+2
| | | | Signed-off-by: limeidan <limeidan@loongson.cn>
* test-integration: support more rootless testsAkihiro Suda2020-03-161-0/+1
| | | | Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
* bump gotest.tools v3.0.1 for compatibility with Go 1.14Sebastiaan van Stijn2020-02-111-3/+3
| | | | | | full diff: https://github.com/gotestyourself/gotest.tools/compare/v2.3.0...v3.0.1 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* testutil: update WithExperimental signature to be a daemon.OptionSebastiaan van Stijn2019-09-301-2/+2
| | | | Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* TestGraphdriverPluginV2: SA5001: should check returned error before ↵Sebastiaan van Stijn2019-09-181-1/+1
| | | | | | | | | | deferring (staticcheck) ``` integration/plugin/graphdriver/external_test.go:427:2: SA5001: should check returned error before deferring responseReader.Close() (staticcheck) ``` Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* integration: remove unused constants and fields (unused)Sebastiaan van Stijn2019-09-181-2/+0
| | | | Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* testutil: make testing packages publicSam Whited2019-09-112-2/+2
| | | | | | | | | | | | | | | | 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>
* integration: change testGraphDriver signature to fix lintingSebastiaan van Stijn2019-06-071-4/+3
| | | | | | Line 441: warning: context.Context should be the first parameter of a function (golint) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* integration: change container.Run signature to fix lintingSebastiaan van Stijn2019-06-071-2/+2
| | | | | | Line 59: warning: context.Context should be the first parameter of a function (golint) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Fix flaky TestExternalGraphDriver/pull testSebastiaan van Stijn2018-07-171-2/+2
| | | | | | | | | | | | | | | | | | | | This test occassionally fails on s390x and Power; 03:16:04 --- FAIL: TestExternalGraphDriver/pull (1.08s) 03:16:04 external_test.go:402: assertion failed: error is not nil: Error: No such image: busybox:latest Most likely these failures are caused due to Docker Hub updating the busybox:latest image, but not all architectures yet being available. Instead of using `:latest`, pull an image by digest, so that the test doesn't depend on Docker Hub having all architectures available for `:latest`. I selected the same digest as is currently used as "frozen image" in the Dockerfile. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Fix golint issuesSebastiaan van Stijn2018-07-111-0/+1
| | | | Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Update tests to use gotest.tools 👼Vincent Demeester2018-06-131-3/+3
| | | | Signed-off-by: Vincent Demeester <vincent@sbr.pm>
* Skip some test on remote daemon for e2e run(s)Vincent Demeester2018-04-261-2/+2
| | | | | | | We really need to run those on the CI too at some point. Signed-off-by: Vincent Demeester <vincent@sbr.pm> Signed-off-by: Tibor Vass <tibor@docker.com>
* Migrate test-integration-cli experimental plugin tests to integrationVincent Demeester2018-04-192-0/+498
All `plugins` tests that require an `ExperimentalDaemon` are migrated to `integration/plugin/*` and start an experimental daemon to test on it. The end goal being to remove the `experimental` build. Signed-off-by: Vincent Demeester <vincent@sbr.pm>