1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

24 commits

Author SHA1 Message Date
Yong Tang
a79a27412d Fix issue in docker import -c with quoted flags
This fix tries to address the issue in 26173 where `docker import -c`
with quoted flags returns an error.

The issue was that in `api/client/image/import.go` the flag
`--change/-c` was handled by `StringSliceVarP` which does not handle
the quote well.

The similiar issue was enountered for 23309 (`docker commit`).

This fix takes the same approach as 23309 where `StringSliceVarP`
was replaced with `VarP` and `opts.ListOpts`.

An integration test has been added to cover the changes.

This fix fixes 26173.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-09-01 16:28:22 -07:00
Tõnis Tiigi
83fc63f967 Merge pull request #26077 from runcom/fix-TestImportBadURL
integration-cli: fix TestImportBadURL w/o network
2016-09-01 09:30:02 -07:00
John Howard
7ea707d5ef Windows: Enable TestImage and TestImport tests
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-08-30 15:20:55 -07:00
Antonio Murdaca
e2be3fee02
integration-cli: fix TestImportBadURL w/o network
As explained in the test comment itself, the error message may vary on
different platform.
This patch adds another condition found while testing w/o network
access on RHEL based distros (Fedora, RHEL, CentOS).

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-08-27 23:57:54 +02:00
Doug Davis
ac043c7db6 Fix docker import tests
For me when I run the test I see:
```
Downloading from http://nourl/bad
Importing    283 B
Untar re-exec error: exit status 1: output: unexpected EOF
```
and nothing about "dial tcp" so it appears that the output is
system dependent and therefore we can't really check it. I think
checking for non-zero exit code is sufficient so I'm removing this
string check.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-05-23 15:34:40 -07:00
Tonis Tiigi
e1c2eb0d35 Fix docker import on compressed data
Fixes #20296

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-02-16 11:19:23 -08:00
liaoqingwei
288214e5ae Use of checkers on docker_cli_import_test.go.
Signed-off-by: liaoqingwei <liaoqingwei@huawei.com>
2015-10-20 19:58:16 +08:00
John Howard
f9a3558a9d Windows: Get Integration CLI running
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-09-04 12:32:40 -07:00
Taylor Jones
936b2c6afe adding message option to the import subcommand
Signed-off-by: Taylor Jones <monitorjbl@gmail.com>
2015-08-25 02:55:04 +00:00
Brian Goff
693ba98cb9 Don't pass check.C to dockerCmdWithError
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-07-27 14:33:32 -04:00
Qiang Huang
668e2369cc dockerCmd when possible
Addresses: #14603

integration-cli/docker_cli_daemon_experimental_test.go (hqhq)
integration-cli/docker_cli_daemon_test.go (hqhq)
integration-cli/docker_cli_diff_test.go (hqhq)
integration-cli/docker_cli_events_test.go (hqhq)
integration-cli/docker_cli_events_unix_test.go (hqhq)
integration-cli/docker_cli_exec_test.go (hqhq)
integration-cli/docker_cli_exec_unix_test.go (hqhq)
integration-cli/docker_cli_experimental_test.go (hqhq)
integration-cli/docker_cli_export_import_test.go (hqhq)
integration-cli/docker_cli_help_test.go (hqhq)
integration-cli/docker_cli_history_test.go (hqhq)
integration-cli/docker_cli_images_test.go (hqhq)
integration-cli/docker_cli_import_test.go (hqhq)
integration-cli/docker_cli_info_test.go (hqhq)
integration-cli/docker_cli_inspect_test.go (hqhq)
integration-cli/docker_cli_kill_test.go (hqhq)

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-07-20 14:55:40 +08:00
Gildas Cuisinier
3f64b76d4c work on #11094 allow import from local file
Signed-off-by: Gildas Cuisinier <gildas.cuisinier@gcuisinier.net>
2015-06-20 09:04:43 +02:00
Doug Davis
3f4926e49b Fix a regression in docker import on error from URL
when the daemon can't download the image from a `docker import` the
error message was lost due to 'err' being redefined with a block by
mistake.  This removes the ":" from "... err := " which fixes it.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-05-14 06:56:52 -07:00
Alexander Morozov
a9688cdca5 Implement teardown removeAllImages
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-04-24 10:37:21 -07:00
Vincent Demeester
c5ef2901d8 delete "defer deleteContainer" on tests
Since docker test suite is now using gocheck, ``defer
deleteContainer(…)`` is not needed anymore.

Fixes #12705

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-04-23 22:27:46 +02:00
Alexander Morozov
dc944ea7e4 Use suite for integration-cli
It prints test name and duration for each test.
Also performs deleteAllContainers after each test.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-04-21 10:28:52 -07:00
Brian Goff
475c65319b Remove stripTrailingCharacters from tests
This was just an alias to `strings.TrimSpace`

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-04-06 09:21:18 -04:00
Tianon Gravi
c7bec92891 Remove cirros.tar.gz completely
Since `cirros.tar.gz` only existed to test `docker import`'s display and
presence in `docker events`, we can instead just use `docker export`
piped directly to `docker import` to achieve the same goal without
another external dependency besides `busybox` (which we already have).

While I was at it, I updated `TestImportDisplay` to also test that the
imported image actually runs successfully as well (so we're testing the
full import round-trip).

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2015-02-18 23:46:25 -07:00
Tonis Tiigi
da3d3b97eb Make sure integration-cli test clean up
Common patterns:
- Multiple images were built with same name but only one cleanup.
- Containers were deleted after images.
- Images not removed after retagging.

Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com> (github: tonistiigi)
2014-11-19 23:41:46 +02:00
unclejack
c0e632246d integcli: lint fixes
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-10-06 23:15:17 +03:00
unclejack
9e5592d6a1 integ-cli: fix TestImportDisplay & add FileServer
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-09-16 01:54:21 +03:00
unclejack
3ec564bfda integ-cli: better debug output for run & import
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-09-12 16:51:21 +03:00
Tibor Vass
d082381a93 address a few nits
Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
2014-07-25 18:29:47 -04:00
Victor Vieux
b430f4f45b add test
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-03-31 19:31:21 +00:00