Commit Graph

21 Commits

Author SHA1 Message Date
Vincent Demeester 10e171cd94 Clean some function in docker_utils_test.go
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-04-12 11:22:32 +02:00
Vincent Demeester 56fb4653e8
Move FakeContext to `integration-cli/cli/build/context` package…
… and continue emptying `docker_utils_test.go` from build related function.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-04-11 18:25:49 +02:00
Vincent Demeester eeaa6c96d8
[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>
2017-03-28 15:17:31 +02:00
Vincent Demeester 50c4475df6
Introduce a `cli` package for test-integration
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-03-23 18:35:22 +01:00
Vincent Demeester b11ba1231e
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>
2017-03-06 16:41:33 +01:00
Vincent Demeester 5dd89abdf1
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>
2017-03-03 15:57:27 +01:00
Vincent Demeester 1858656925
Move TearDownTest cleaning to environment package
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-03-01 21:04:11 +01:00
Vincent Demeester ecbb0e62f6 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>
2017-01-30 10:54:06 +01:00
Vincent Demeester c10f6ef43f
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>
2017-01-17 15:42:38 +01:00
Vincent Demeester c8016e669f
Use testEnv methods and remove most of the global variables
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-17 12:39:08 +01:00
Vincent Demeester c778f4b964
Refactor docker_cli_build_test.go
Use `testutil/cmd` for `buildCommand`.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-15 16:48:08 +01:00
Sebastiaan van Stijn e5058ff15c Merge pull request #29947 from vdemeester/integration-some-runCommandWithOutput-clean
[test-integration] clean some runCommandWithOutput
2017-01-10 15:56:42 +01:00
Sebastiaan van Stijn d4791c7b64 Merge pull request #29795 from vdemeester/integration-request-package
[test-integration] Add a new request package in integration-cli
2017-01-09 14:51:40 +01:00
Vincent Demeester 87e3fcfe1e
Clean some runCommandWithOutput accross integration-cli code
There is still ways to go

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-05 17:44:31 +01:00
Vincent Demeester b029d3dee3
Should check for output, not error in deleteContainer
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-04 11:15:36 +01:00
Vincent Demeester d69d4799a3
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>
2017-01-03 11:49:30 +01:00
Vincent Demeester 636d6ee57c
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>
2017-01-02 22:14:24 +01:00
Sebastiaan van Stijn ed689c48b0 Merge pull request #29799 from vdemeester/integration-registry-package
[test-integration] Add a registry package with registry v1/v2 code
2017-01-02 15:37:09 +01:00
Vincent Demeester 4300e5e881
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>
2017-01-02 11:03:53 +01:00
Vincent Demeester 33968e6c7d
Remove pkg/integration and move it to testutil or integration-cli
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-12-30 18:26:34 +01:00
Vincent Demeester 433e2e8a1e
Introduce a environment package in integration-cli
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-12-29 11:00:50 +01:00