Commit Graph

13 Commits

Author SHA1 Message Date
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