Commit Graph

19 Commits

Author SHA1 Message Date
de10a198b8 [test-integration] Migrate some more tests to cli package
Add some required command operators to the `cli` package, and update
some tests to use this package, in order to remove a few functions
from `docker_utils_test.go`

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: eeaa6c96d83575da765dfc626c2c73d8a29dda32
Component: engine
2017-03-28 15:17:31 +02:00
9210b1bdbd Introduce a cli package for test-integration
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 50c4475df6304e0cf12ea95217eb00ab5d572e34
Component: engine
2017-03-23 18:35:22 +01:00
fea75fa014 Update request.* signature to remove the host
99.9% of use case for request call are using daemonHost. This makes it
default and adds a `request.DoOnHost` function to be able to specify
the host for specific, more complex use cases.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: b11ba1231ef0ac99279ed5dcd76d81413d7d63b5
Component: engine
2017-03-06 16:41:33 +01:00
b8d452f1fe Ignore no such container in testEnv.Clean
When moving the clean function there, this check was not ported and
generated some errors on the CI. `deleteContainer` now fail if any
error but the clean function won't if "no such container" (because of
some races -_-).

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 5dd89abdf1ec3e633ce01e74d1c47f8eb02fa31e
Component: engine
2017-03-03 15:57:27 +01:00
ecbbe626b3 Move TearDownTest cleaning to environment package
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 1858656925c8705ae433769fbb9a2c18b6685a69
Component: engine
2017-03-01 21:04:11 +01:00
e290b2d1c4 Remove most of the runCommandWithOutput from integration tests
There is 5 calls left, that use StdinPipe that is not yet supported by
icmd.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: ecbb0e62f66da7d698c4f4583f36b927d8cfa811
Component: engine
2017-01-30 10:54:06 +01:00
bdb483e4e4 Clean more build utils in integration cli
- Remove deprecated buildImage* functions
- Rename buildImageNew to buildImage
- Use *check.C in fakeContext* setup and in getIdByName

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: c10f6ef43f884306eb3ef60b2d19fdc931cf34cc
Component: engine
2017-01-17 15:42:38 +01:00
f7b8e381ec Use testEnv methods and remove most of the global variables
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: c8016e669f9507480745a441ba4cd735150ebb85
Component: engine
2017-01-17 12:39:08 +01:00
93d29be66d Refactor docker_cli_build_test.go
Use `testutil/cmd` for `buildCommand`.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: c778f4b964934aeaf0d86d79ea7397940b303238
Component: engine
2017-01-15 16:48:08 +01:00
6a39de5e4f Merge pull request #29947 from vdemeester/integration-some-runCommandWithOutput-clean
[test-integration] clean some runCommandWithOutput
Upstream-commit: e5058ff15cac51836f426175df8a7840a670f046
Component: engine
2017-01-10 15:56:42 +01:00
3bc19fbcc4 Merge pull request #29795 from vdemeester/integration-request-package
[test-integration] Add a new request package in integration-cli
Upstream-commit: d4791c7b64b6095917e0a0ac9b376045ef3d353f
Component: engine
2017-01-09 14:51:40 +01:00
424f0925a7 Clean some runCommandWithOutput accross integration-cli code
There is still ways to go

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 87e3fcfe1e059780c4ee57abb097296fd29e09af
Component: engine
2017-01-05 17:44:31 +01:00
1f42780a09 Should check for output, not error in deleteContainer
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: b029d3dee36d2d3c51b66557b4f03e493fe45fee
Component: engine
2017-01-04 11:15:36 +01:00
44a6bbe938 Add a new request package in integration-cli
The goal is to remove function from `docker_utils.go` and setup
simple, one-responsability package that can be well tested ; and to
ease writing request.

This moves all the calls to `sockRequest` (and similar methods) to
their counterpart in the `request` package.

This introduce `request.Do` to write easier request (with functional
argument to easily augment the request) with some pre-defined function
for the most used http method (i.e. `request.Get`, `request.Post` and
`request.Delete`).

Few of the `sockRequest` call have been moved to `request.Do` (and
`Get`, etc.) to showcase the usage of the package. There is still a
whole lot to do.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: d69d4799a312dfcae63442e290ae6667afd1a038
Component: engine
2017-01-03 11:49:30 +01:00
7cbb50d925 Do not fail in TearDown if container not found when removing
If the container is not found when removing, it means it's already not
there anymore, so it's safe to ignore. This should reduce a bit some
`TearDown` flakyness..

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 636d6ee57c85df086823e998077d83dc0bb94035
Component: engine
2017-01-02 22:14:24 +01:00
9966a465fe Merge pull request #29799 from vdemeester/integration-registry-package
[test-integration] Add a registry package with registry v1/v2 code
Upstream-commit: ed689c48b08f393fbb652681b9b3e859380ae5e3
Component: engine
2017-01-02 15:37:09 +01:00
ee40f7aac0 Add a registry package with registry v1/v2 code
This extract what was in registry_test.go and
registry_mock_test.go. This also move `RegistryHosting`
requirement to `registry.Hosting`

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 4300e5e8818571a55e00d9987bec3ad6ca92dc6f
Component: engine
2017-01-02 11:03:53 +01:00
2758f0996d Remove pkg/integration and move it to testutil or integration-cli
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 33968e6c7df164fff0a882c50ae7f4f7e6190e4b
Component: engine
2016-12-30 18:26:34 +01:00
0f363a44c6 Introduce a environment package in integration-cli
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 433e2e8a1eb84ad7bb39b5206b2fdf6ac9da7b27
Component: engine
2016-12-29 11:00:50 +01:00