Граф коммитов

48 Коммитов

Автор SHA1 Сообщение Дата
John Howard f9a3558a9d Windows: Get Integration CLI running
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-09-04 12:32:40 -07:00
David Calavera 06699f73fb Refactor daemon container list.
Separate container iteration, filtering and reducing.
This will make easier in the future to improve the implementation of
docker ps as we know it.

The end goal is to unify the objects returned by the api for docker ps
and docker inspect, leaving all docker ps transformations to the client.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-08-31 04:24:08 -04:00
Vincent Demeester c1af0ac082 Add 'ancestor' ps filter for image
Makes it possible to filter containers by image, using
--filter=ancestor=busybox and get all the container running busybox
image and image based on busybox (to the bottom).

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-08-26 22:59:48 +02:00
Travis Thieman 2167f40a76 Use image ID if tag has been updated
Fixes #12595

Signed-off-by: Travis Thieman <travis.thieman@gmail.com>
2015-08-23 12:11:24 -04:00
Brian Goff 5929502b4e Merge pull request #15412 from vdemeester/dont-sleep-too-much
time.Sleep in integration tests — comment and waitRun/waitInspect
2015-08-21 20:43:55 -04:00
Vincent Demeester 799d9605d6 Remove/Comment time.Sleep in integration tests
Remove what seems unnecessary time.Sleep (1 second even) and comment the
ones that seemed necessary.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-08-18 20:36:08 +02:00
David Calavera df46bfdd4d Fix ignore `-q` flag in `docker ps` when there is a default format.
Docker ps default format should not take precedence over cli flags.
This happens effectively for other flags except `-q`.
We need to let the cli to set the format as table to print the
expected output with `-q`.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-08-17 10:48:04 -07: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
Tianon Gravi f57fc03e3b Fix "docker ps" with no containers regression
The header row was not being printed when "docker ps" was invoked without containers thanks to the new format support, and we instead received a single blank line.

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2015-07-23 13:23:24 -07:00
Phil Estes 542b58d8f7 ps --format: Add config.js doc, fix gofmt, add integration tests
Re-add the docs from @calavera's PR to the moved cli cmd reference docs.
Fix gofmt and vet issues from carried commits
Add integration test for using format with --no-trunc and multi-names
Fix custom_test map order dependency on expected value check
Add docs to reference/commandline/ps.md
Remove "-F" flag option from original carried PR content

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2015-07-22 12:51:16 -04:00
Vincent Demeester 5c295460da Use dockerCmd when possible (#14603)
- integration-cli/docker_cli_attach_test.go
- integration-cli/docker_cli_attach_unix_test.go
- integration-cli/docker_cli_build_test.go
- integration-cli/docker_cli_build_unix_test.go
- integration-cli/docker_cli_by_digest_test.go
- integration-cli/docker_cli_commit_test.go
- integration-cli/docker_cli_config_test.go
- integration-cli/docker_cli_cp_test.go
- integration-cli/docker_cli_create_test.go
- integration-cli/docker_cli_pause_test.go
- integration-cli/docker_cli_port_test.go
- integration-cli/docker_cli_port_unix_test.go
- integration-cli/docker_cli_proxy_test.go
- integration-cli/docker_cli_ps_test.go
- integration-cli/docker_cli_pull_test.go
- integration-cli/docker_cli_push_test.go

- docker_api_attach_test.go
- docker_api_containers_test.go
- docker_api_events_test.go
- docker_api_exec_resize_test.go
- docker_api_exec_test.go
- docker_api_images_test.go
- docker_api_info_test.go

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-07-14 21:52:43 +02:00
John Howard 7bf26d44b0 Validate status= filter to docker ps
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-07-02 16:12:42 -07:00
David Calavera 6c42b3947a Merge pull request #12838 from fntlnz/test-cmd
Using dockerCmd when possible
2015-06-02 14:12:22 -07:00
Doug Davis dc697b1c9f Add a "Created" state for new containers that haven't been run yet
Closes #13353

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-05-30 07:48:46 -07:00
Lei Jitang d0de2b1e2f Make docker ps --size show virtual size really work
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-05-21 08:57:11 +08:00
Lorenzo Fontana a2787469ac Using dockerCmd when possible
Signed-off-by: Lorenzo Fontana <fontanalorenzo@me.com>
2015-05-19 20:33:59 +02:00
Antonio Murdaca 4203230cbb c.Fatal won't fail and exit test inside a goroutine, errors should be handled outside with a channel
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-29 17:02:22 +02:00
David Mackey 3941623fbc trivial: typo cleanup
Signed-off-by: David Mackey <tdmackey@booleanhaiku.com>
2015-04-27 13:35:08 -07:00
Alexander Morozov a9688cdca5 Implement teardown removeAllImages
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-04-24 10:37:21 -07:00
Antonio Murdaca ee7a7b07e7 Remove deleteAllContainers call in test
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-23 16:32:50 +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
Todd Whiteman 42d47c3136 fix #12188 integration-cli: tests using "sleep" can timeout too early - change to "top" instead
Signed-off-by: Todd Whiteman <todd.whiteman@joyent.com>
2015-04-09 10:46:57 -07:00
Liu Hua 645c020f5a fix up Image-name related issues in docker ps and CI
This patch include the following fixs:
 - fix image name error when docker ps
 - fix docker events test failure: use the exact image name for filter
 - fix docker build CI test failure due to "docker events" change

Because of change of daemon log behavior. Now we record
the exact Image name as you typed. So docker run -d busybux sh
and docker run -d busybox:latest are not the same in the log.
So it will affect the docker events. So change the related CI

Signed-off-by: Liu Hua <sdu.liu@huawei.com>
2015-04-09 23:03:23 +08:00
Jessica Frazelle 255b84444a cleanup/fix integration-cli for overlay in overlay
Signed-off-by: Jessica Frazelle <jess@docker.com>
2015-04-08 16:59:36 -07:00
Arnaud Porterie b9d2ede4d4 Merge pull request #12107 from cpuguy83/remove_striptrailingchars
Remove `stripTrailingCharacters` from tests
2015-04-06 08:46:08 -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
Todd Whiteman 3e51a81475 integration-cli: add check for TestPsListContainersSize when no containers are returned
* when no containers are returned, go test would then aborts with:
  panic: runtime error: index out of range

Signed-off-by: Todd Whiteman <todd.whiteman@joyent.com>
2015-04-02 14:45:52 -07:00
unclejack cfa8aaf16f integration-cli: make TestPsGroupPortRange fast
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2015-04-02 18:26:29 +03:00
Peter Choi ae907e7af1 Changed snake case naming to camelCase
Signed-off-by: Peter Choi <phkchoi89@gmail.com>
2015-03-26 15:05:45 -06:00
Darren Shepherd 5de1298f41 Add more tests for labels on containers
Signed-off-by: Darren Shepherd <darren@rancher.com>
2015-03-13 10:02:04 -07:00
Darren Shepherd abb5e9a077 Set labels on container create
Signed-off-by: Darren Shepherd <darren@rancher.com>
2015-03-13 10:02:04 -07:00
Ahmet Alp Balkan 70407ce40c Better test cleanup with defer
This fixes a few misuses of `deleteAllContainers()` cleanup
method in integration-cli suite by moving call to the
beginning of the method and guaranteeing their execution
(including panics) with `defer`s.

Also added some forgotten cleanup calls while I'm at it.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-02-20 14:04:36 -08:00
Jessica Frazelle ba99a73c2f fix naming, add a test for port range on docker ps
Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <jess@docker.com> (github: jfrazelle)
2015-02-16 11:08:32 -08:00
Alexander Morozov 2a3225eb82 Test for links names in ps --no-trunc
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-02-06 14:05:08 -08:00
Alexander Morozov e45deceb46 Show right tag for container in ps
Fixes #10599

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-02-06 11:32:01 -08:00
Abin Shahab 29ac29a436 Fixes symlink, container size, and kmsg tests
Changes symlink, container size and kmsg tests to account for lxc driver.
Signed-off-by: Abin Shahab <ashahab@altiscale.com> (github: ashahab-altiscale)
Docker-DCO-1.1-Signed-off-by: Abin Shahab <ashahab@altiscale.com> (github: ashahab-altiscale)
2015-01-30 09:30:42 +00:00
Abin Shahab 3ca5af6b1a Adds ipc namespace capability to lxc, and fixes tests.
This fixes various tests by checking for non zero exit code, accounting for lxc-specific base-diffs, and by removing lxc specific environment vars.
It also adds the --share-ipc option to lxc-start for shared ipc namespaces.
Signed-off-by: Abin Shahab <ashahab@altiscale.com> (github: ashahab-altiscale)
Docker-DCO-1.1-Signed-off-by: Abin Shahab <ashahab@altiscale.com> (github: ashahab-altiscale)
2015-01-21 06:08:00 +00:00
Vincent Batts 3ec6959240 Merge pull request #9985 from jfrazelle/fix-exited-filter-should-not-show-running
`docker ps --filter exited=status` should not show running containers
2015-01-12 15:09:22 -05:00
Jessica Frazelle 81f84023be `docker ps --filter exited=status` should not show running containers
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2015-01-08 16:23:54 -08:00
Jessica Frazelle 2639e073b1 `docker ps --filter status=exited should not require passing -a`
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2015-01-08 15:37:07 -08:00
Alexandr Morozov 03ea2166b6 Fix deadlock in ps exited filter
Fixes #8909

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-11-03 10:51:03 -08:00
Srini Brahmaroutu 1634625353 Adding capability to filter by name, id or status to list containers api
Closes #7599

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2014-10-20 18:33:20 +00:00
Jessica Frazelle d33f2bdb11 Cleanup errorOut resp in ps tests
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2014-10-16 15:06:19 -07: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
Jessica Frazelle ea09f03682 Filter containers by status.
A continuation of #7616.
Adds `docker ps --filter=status=(restarting|running|paused|stopped)` option.

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2014-09-29 20:11:19 -07:00
Alexandr Morozov 00b82fcab6 Use prefix naming for ps tests
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-19 22:11:54 +04:00
Alexandr Morozov 41cbce8c00 Test for docker ps -s
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
2014-09-12 11:45:50 +04:00
Fabio Falci 261dc5e2f6 Move `docker ps` test to integration cli
Docker-DCO-1.1-Signed-off-by: Fabio Falci <fabiofalci@gmail.com> (github: fabiofalci)
2014-07-18 09:43:40 +01:00