Commit graph

114 commits

Author SHA1 Message Date
Lorenzo Fontana
a2787469ac Using dockerCmd when possible
Signed-off-by: Lorenzo Fontana <fontanalorenzo@me.com>
2015-05-19 20:33:59 +02:00
Ahmet Alp Balkan
1630ed97ac Introduce daemon event 'tag' upon image tagging
Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-05-15 20:21:59 +00:00
Ahmet Alp Balkan
999f464feb Parse input timestamps with standard RFC3339
Fix for #13175.

This change allows user-input timestamps (e.g. to `docker events
--since/--until`  or `docker logs --since` to be parsed using
standard RFC3339Nano layout in Go instead of the layout that parses
all timestamps into fixed-length strings (currently buggy).

User inputs need not to be complying to the internal format
(`RFC3339NanoFixed`) anyway.

Added test case for `events --since/--until` with all possible
timestamp input formats.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-05-14 07:44:42 +00: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
Lorenzo Fontana
40779b28bb Parallelize TestEventsLimit
Signed-off-by: Lorenzo Fontana <fontanalorenzo@me.com>
2015-04-27 21:14:00 +02:00
Brian Goff
03719be830 Merge pull request #12754 from LK4D4/carry_12707
fix runtime issue for TestEventsFilterContainer
2015-04-24 14:36:58 -04:00
Daniel Antlinger
07795c3f5d fix runtime issue for TestEventsFilterContainer
Signed-off-by: Daniel Antlinger <d.antlinger@gmx.at>
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-04-24 10:48:40 -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
eeb8ceb9ed Fix TestEventsImageImport racy, fixes #12499
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-22 17:30:30 +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
bobby abbott
621b601b3c Removed unnecessary error output from dockerCmd
Changed method declaration. Fixed all calls to dockerCmd
method to reflect the change.

resolves #12355

Signed-off-by: bobby abbott <ttobbaybbob@gmail.com>
2015-04-17 09:11:14 -07:00
Alexander Morozov
b02cf5239e Merge pull request #12115 from cpuguy83/fix_events_filter_test
Cleanup events filter by container test
2015-04-09 11:40:08 -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
Brian Goff
7e70998bb8 Cleanup events filter by container test
This also seemed to be checking the ordering of the events, which
doesn't seem like something we sould be interested in this particular
test.

Added check to make sure the filtered events have the expected ID's.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-04-09 09:47:58 -04:00
Alexander Morozov
8fd2b52146 Fix fail message in TestEventsImageImport
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-04-07 14:22:43 -07:00
Alexandr Morozov
e45bf8d2e9 Decrease timeouts in TestEventsStreaming
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2015-04-06 13:40:56 -07:00
Alexandr Morozov
5fa3a6f248 Pass right timestamp instead of crap from string(int64)
Problem is that --since can consume anything not near looking as
timestamp.

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2015-04-06 13:39:02 -07:00
Antonio Murdaca
d1c4439b5a Test events streaming, fixes #12079
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-06 19:00:17 +02: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
Arnaud Porterie
9c505c906d Merge pull request #11571 from noironetworks/11555-Docker-since-beginning-of-unix-time-doesnt-work
Fixes docker events since beginning of unix time
2015-04-02 15:03:04 -07:00
André Martins
8f7ac20bac Fixes docker events since beginning of unix time
Fixes issue #11555
Applied a workaround to check if since and until flags are valid or not.

Signed-off-by: André Martins <martins@noironetworks.com>
2015-04-01 18:14:59 +01:00
Mabin
e15c3e36cc Fix random bug in cli events test
Signed-off-by: Mabin <bin.ma@huawei.com>
2015-04-01 11:00:01 +08:00
Srini Brahmaroutu
f5ad895ba6 Use common code to test all events, when using filter that expect all lifecycle events.
Addresses: #10654

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-03-27 02:47:46 +00:00
Jake Champlin
c2fe262439 Add fixes for integration-cli tests w/ --net none
Adds network to integration tests that were failing without network.

Fixes #10964
Fixes #10968

Signed-off-by: Jake Champlin <jake.champlin.27@gmail.com>
2015-03-25 23:46:04 -04:00
Ahmet Alp Balkan
e424c54d9c integ-cli: fix clock skew against remote test daemon
This fixes the `docker events`-related tests as they have been
failing due to clock skew between CI machine and test daemon on
some other machine (even 1-2 seconds of diff causes races as
we pass local time to --since/--until).

If we're running in same host, we keep using time.Now(), otherwise
we read the system time of the daemon from `/info` endpoint.

Fixes pretty much all events-related tests on windows CI.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-03-11 10:28:56 -07:00
Srini Brahmaroutu
e0fa577378 filter events by container name,id or partial id
Addresses #10645

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-03-06 19:54:57 +00:00
Phil Estes
c94eb28af0 Merge pull request #10675 from brahmaroutu/events_filterbyimage_10645
Allow use of just image name without the tag
2015-03-06 13:38:41 -05:00
Jessie Frazelle
a8b699f5d9 Merge pull request #10798 from ahmetalpbalkan/win-cli/TestEventsUntag-fix
integration-cli: Remove timeout dependency on TestEventsUntag
2015-03-04 03:54:33 -08:00
Srini Brahmaroutu
ce02578317 Allow use of just image name without the tag
Addresses #10645

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-03-03 22:38:45 +00:00
Jessica Frazelle
202709d178 fix racy events test
Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <jess@docker.com> (github: jfrazelle)
2015-02-27 14:48:39 -08:00
Jessie Frazelle
2768ce0e4e Merge pull request #10998 from jfrazelle/fix-filter-events-test-better
Fix events test so it doesnt need new daemon
2015-02-27 12:05:48 -08:00
Jessica Frazelle
9aff77156b Fix events test so it doesnt need new daemon
Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <jess@docker.com> (github: jfrazelle)

Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <hugs@docker.com> (github: jfrazelle)

Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <princess@docker.com> (github: jfrazelle)
2015-02-24 18:28:16 -08:00
Abin Shahab
1a26ed09ee Implements stats for lxc driver
Implements stats and fixes stats test.

Signed-off-by: Abin Shahab <ashahab@altiscale.com> (github: ashahab-altiscale)
2015-02-23 10:16:52 +00:00
Jessica Frazelle
27c61c39db fix race in events test
Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <jess@docker.com> (github: jfrazelle)
2015-02-19 15:32:00 -08:00
Jessie Frazelle
934535db9c Merge pull request #10468 from noironetworks/10457-Pause-and-unpause-accept-multi-containers
Allow docker pause and unpause to accept multiple containers
2015-02-19 15:16:05 -08: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
Ahmet Alp Balkan
5dbaea1ca9 integration-cli: remove timeout dependency on TestEventsUntag
TestEventsUntag requires a `timeout` command which does not
exist on OS X or Windows (in fact, windows has a totally different
timeout program and this test was accidentally using it).

- Created runCommandWithOutputForDuration.
  This entirely replaces runDockerCommandWithTimeout and
  removes dependency to `timeout` command.
- Made runDockerCommandWithTimeout reuse runDockerCommandForDuration.

TestEventsUntag works now on Windows.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-02-14 02:17:42 -08:00
Tibor Vass
aadb6289cc Remove word "fail" from tests
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-02-09 18:01:52 -05:00
André Martins
0ce42dcc96 Fixes #10457-Pause-and-unpause-accept-multi-containers
Applied multi parameters to pause and unpause.
Created a new test file dedicated for pause commands.
Created a new utility function to get a slice of paused containers.
Updated documentation

Signed-off-by: André Martins <martins@noironetworks.com>
2015-02-07 00:28:49 +00:00
Derek McGowan
6088df20c3 Update verification message logic
Only show the verification message if all the tarsum checks pass and the image manifest is verified.
No longer return an error when a tarsum verification fails, just reset the verification flag.
Tarsum verification is less meaningful without a verified manifest and therefore it should not cause an error.
Updated the verified image test to pull an image which expected to have a verified manifest and contents.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-02-05 17:46:55 -08:00
Doug Davis
6d801a3caa Have .dockerignore support Dockerfile/.dockerignore
If .dockerignore mentions either then the client will send them to the
daemon but the daemon will erase them after the Dockerfile has been parsed
to simulate them never being sent in the first place.

an events test kept failing for me so I tried to fix that too

Closes #8330

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-01-06 10:57:48 -08:00
Arnaud Porterie
f3ed42286e Enable test-integration-cli for Windows platform
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2014-12-20 16:40:40 -08:00
Josh Hawn
8936789919 Make FROM scratch a special cased 'no-base' spec
There has been a lot of discussion (issues 4242 and 5262) about making
`FROM scratch` either a special case or making `FROM` optional, implying
starting from an empty file system.

This patch makes the build command `FROM scratch` special cased from now on
and if used does not pull/set the the initial layer of the build to the ancient
image ID (511136ea..) but instead marks the build as having no base image. The
next command in the dockerfile will create an image with a parent image ID of "".
This means every image ever can now use one fewer layer!

This also makes the image name `scratch` a reserved name by the TagStore. You
will not be able to tag an image with this name from now on. If any users
currently have an image tagged as `scratch`, they will still be able to use that
image, but will not be able to tag a new image with that name.

Goodbye '511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158',
it was nice knowing you.

Fixes #4242

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2014-12-18 14:03:38 -08:00
Jessica Frazelle
8635b0248a fix where cmd function dne
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2014-11-25 18:34:08 -08:00
Jessie Frazelle
9160e01cef Merge pull request #8893 from vieux/filter_events
Events filtering (daemon side)
2014-11-25 17:52:27 -08:00
Victor Vieux
f0f0e316aa fix tests
Signed-off-by: Victor Vieux <vieux@docker.com>
2014-11-26 00:00:56 +00:00
Daehyeok Mun
7fbbd515b1 remove deprecated cmd function in integration-cli
Remove deprecated cmd function in integration-cli
and change cmd to dockerCmd in all test files

Signed-off-by: Daehyeok Mun <daehyeok@gmail.com>
2014-11-25 00:32:38 +09:00
Victor Vieux
7ff3b81054 events filtering
Signed-off-by: Victor Vieux <vieux@docker.com>
2014-11-20 19:46:48 +00:00
Jessie Frazelle
eb3bbde6d1 Merge pull request #9251 from tonistiigi/use-format-logging-functions
Fix misuses of format based logging functions
2014-11-19 15:25:42 -08:00