Commit Graph

28 Commits

Author SHA1 Message Date
Sebastiaan van Stijn 554d9cec25
testutil: update WithExperimental signature to be a daemon.Option
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-30 17:38:24 +02:00
Sam Whited 41adef29f5 testutil/daemon: group options under type
Signed-off-by: Sam Whited <sam@samwhited.com>
2019-09-18 09:14:50 -05:00
Sam Whited b37c214e3c testutil: make testing packages public
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>
2019-09-11 07:47:23 -05:00
Olli Janatuinen f787b235de Add support capabilities list on services
Signed-off-by: Olli Janatuinen <olli.janatuinen@gmail.com>
2019-05-28 19:52:36 +03:00
Sebastiaan van Stijn 67d6f174ae
Add more details to RunningTasksCount
Provide slightly better information about the current state
of tasks.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-02-27 17:08:44 +01:00
Yong Tang e485a60e2b Move serviceRunningTasksCount to integration/internal/swarm
This fix moves multiple places of serviceRunningTasksCount
to one location in integration/internal/swarm, so that
code duplication could be removed.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-01-19 18:54:32 +00:00
Vincent Demeester 38015177d8
Merge pull request #38557 from thaJeztah/remove_duplicated_code
Integration tests: remove some duplicated code, and preserve context
2019-01-15 09:03:45 +01:00
Sebastiaan van Stijn 56a68c15f8
Integration tests: remove some duplicated code, and preserve context
This introduces `NoTasksForService` and `NoTasks` poller checks, that
can be used to check if no tasks are left in general, or for a specific
service.

Some redundant checks were also removed from some tests.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-01-14 04:53:27 +01:00
Sebastiaan van Stijn 8172edf04c
GetRunningTasks: pass client instead of daemon
Tests generally already have a client instance, so it
probably makes more sense to just pass it, and make
this utility a bit more flexible to use.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-01-14 02:30:40 +01:00
Olli Janatuinen 153171e9dd Added support for maximum replicas per node to services
Signed-off-by: Olli Janatuinen <olli.janatuinen@gmail.com>
2018-12-24 02:04:15 +02:00
Sebastiaan van Stijn b0de11cf30
Add test for status code on conflicting service names
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-11-24 11:53:08 +01:00
Vincent Demeester d3cc071bb9 Windows: Start of enabling tests under integration/
- Add windows CI entrypoint script.

Signed-off-by: John Howard <jhoward@microsoft.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-09-26 12:28:22 -07:00
Drew Erny 14da20f5e7 Add support for sysctl options in services
Adds support for sysctl options in docker services.

* Adds API plumbing for creating services with sysctl options set.
* Adds swagger.yaml documentation for new API field.
* Updates the API version history document.
* Changes executor package to make use of the Sysctls field on objects
* Includes integration test to verify that new behavior works.

Essentially, everything needed to support the equivalent of docker run's
`--sysctl` option except the CLI.

Includes a vendoring of swarmkit for proto changes to support the new
behavior.

Signed-off-by: Drew Erny <drew.erny@docker.com>
2018-09-20 10:51:56 -05:00
Vincent Demeester 3845728524
Update tests to use gotest.tools 👼
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-06-13 09:04:30 +02:00
Vincent Demeester e401b88e59
Add support for `init` on services
It's already supported by `swarmkit`, and act the same as
`HostConfig.Init` on container creation.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-06-07 14:17:55 +02:00
Dennis Chen 476d7872ef Some slight tweaks for the integration test
`arm64` needs get more time duration for the test to finish.

`pty.Start()` opens a file, so the caller should close it explicitly,
else the file I/O can result in unexpected data synchronization issue.

All those changes will not affect the test itself.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
2018-05-21 10:08:27 +08:00
Sebastiaan van Stijn 6d20814819
Merge pull request #36803 from adshmh/refactor-network-integration-tests-use-swarm-create-service
refactored network integration tests to make use of swarm.CreateService
2018-05-08 00:21:32 +02:00
Vincent Demeester ef2c2040c2 Skip some test on remote daemon for e2e run(s)
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>
2018-04-26 16:25:52 +00:00
Arash Deshmeh 8e335e00bb refactored network integration tests to make use of swarm.CreateService
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
2018-04-21 09:07:57 -04:00
Vincent Demeester cb8db44395
Make testing helpers as such…
That way, those lines won't be reported in the failure.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-04-20 10:38:43 +02:00
Vincent Demeester aa0db6f9e1
Migrate TestAPISwarmServicesPlugin to integration
Also starts to create more "poll/check" function to `internal/test/daemon`.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-04-18 16:18:53 +02:00
Vincent Demeester 239a8a5189
Small daemon refactoring and add swarm init/join helpers
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-04-16 10:20:10 +02:00
Vincent Demeester 83d18cf4e3
Make internal/test/daemon.Daemon swarm aware
This remove the daemon.Swarm construction by make the new test Daemon
struct aware of swarm.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-04-11 12:10:17 +02:00
Dennis Chen ee6959addc Add default pollSettings adjustment routines
Add the default function per resource to override the `pollSettings`
which will be re-used where it's needed.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
2018-03-29 04:47:14 +00:00
Vincent Demeester 6016e79d25
integration/*: make e2e run without failure
… mainly by skipping if daemon is remote.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-03-19 09:47:17 +01:00
Daniel Nephin 6be0f70983 Automated migration using
gty-migrate-from-testify --ignore-build-tags

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2018-03-16 11:03:43 -04:00
Aaron Lehmann cdd2e6efdb integration-cli: Add secret/config templating tests
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2018-02-16 11:25:13 -05:00
Vincent Demeester af306d149e
Rename integration/util to integration/internal
Both names have no real sense, but one allows to make sure these packages
aren't used outside of `integration`.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-02-10 09:16:32 +01:00