summaryrefslogtreecommitdiff
path: root/test/e2e/logs_test.go
Commit message (Collapse)AuthorAge
* Revert #6591 to fix issue with failed testsjgallucci322020-06-17
| | | | Signed-off-by: jgallucci32 <john.gallucci.iv@gmail.com>
* "streaming output" logs test: fix flakeEd Santiago2020-06-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Test has been flaking excessively. A quick look shows that the test itself is broken, making a bad assumption. 'podman logs -f' is guaranteed to exit when a container terminates. This does not (and should not) mean that the container has been cleaned up. It is undefined and unsafe to run 'podman run -n same-name-as-terminated-container' immediately after 'podman logs' exits. Solution: instead of 'podman run', do 'podman inspect'. This, too, is unsafe, but we can expect to see one of two possible conditions: 1) command succeeds, in which case we require that container State.Status be "exited"; or 2) command fails, in which case we expect "no such container" in error output For full coverage we should add a small delay-check test to (1) to ensure that the container is cleaned up after a short amount of time. Leaving that as a TODO because it's more than my Go skills can handle, and I want to get this checked in ASAP to get rid of the flake hassle. Signed-off-by: Ed Santiago <santiago@redhat.com>
* Fix -f logs follow with stopped containerQi Wang2020-06-11
| | | | | | Fix -f logs follow with stopped container. Close #6531 Signed-off-by: Qi Wang <qiwan@redhat.com>
* V2 enable remote logs and testingJhon Honce2020-05-22
| | | | | | | | | | * wire up bindings and handler for obtaining logs remotely * enable debug logging from podman in e2e test using DEBUG and DEBUG_SERVICE env variables * Fix error in streaming log frames * enable remote logs test Signed-off-by: Jhon Honce <jhonce@redhat.com>
* don't skip log tests unless remotePeter Hunt2020-05-20
| | | | Signed-off-by: Peter Hunt <pehunt@redhat.com>
* oci conmon: tell conmon to log container namePeter Hunt2020-05-20
| | | | | | | | | | specifying `-n=ctr-name` tells conmon to log CONTAINER_NAME=name if the log driver is journald add this, and a test! also, refactor the args slice creation to not append() unnecessarily. Signed-off-by: Peter Hunt <pehunt@redhat.com>
* v2 enable remote integration testsBrent Baude2020-05-19
| | | | | | enable remote integration tests Signed-off-by: Brent Baude <bbaude@redhat.com>
* log: support --log-opt tag=Giuseppe Scrivano2020-01-10
| | | | | | | | | | support a custom tag to add to each log for the container. It is currently supported only by the journald backend. Closes: https://github.com/containers/libpod/issues/3653 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* logs: support --tail 0Giuseppe Scrivano2019-10-31
| | | | | | | | | change the default to -1, so that we can change the semantic of "--tail 0" to not print any existing log line. Closes: https://github.com/containers/libpod/issues/4396 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* Refactor tests when checking for error exit codesJhon Honce2019-10-16
| | | | | | | Rather than checking for non-zero, we need to check for >0 to distinguish between timeouts and error exit codes. Signed-off-by: Jhon Honce <jhonce@redhat.com>
* test: add test for logs -fGiuseppe Scrivano2019-06-17
| | | | | | | discussion here: https://github.com/containers/libpod/issues/3325#issuecomment-502214492 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* use imagecaches for local testsbaude2019-05-29
| | | | | | | | | when doing localized tests (not varlink), we can use secondary image stores as read-only image caches. this cuts down on test time significantly because each test does not need to restore the images from a tarball anymore. Signed-off-by: baude <bbaude@redhat.com>
* Implement podman logs with log-driver journaldPeter Hunt2019-05-28
| | | | | | | | Add a journald reader that translates the journald entry to a k8s-file formatted line, to be added as a log line Note: --follow with journald hasn't been implemented. It's going to be a larger undertaking that can wait. Signed-off-by: Peter Hunt <pehunt@redhat.com>
* enable integration tests for remote-clientbaude2019-05-07
| | | | | | | first pass at enabling a swath of integration tests for the remote-client. Signed-off-by: baude <bbaude@redhat.com>
* podman logs on created container should exitbaude2019-03-18
| | | | | | | | | | | when running podman logs on a created container (which has no logs), podman should return gracefully (like docker) with a 0 return code. if multiple containers are provided and one is only in the created state (and no follow is used), we still display the logs for the other ids. fixes issue #2677 Signed-off-by: baude <bbaude@redhat.com>
* display logs for multiple containers at the same timebaude2019-03-15
| | | | | | | | | | | | | | add the ability for users to specify more than one container at a time while using podman logs. If more than one container is being displayed, podman will also prepend a shortened container id of the container on the log line. also, enabled the podman-remote logs command during the refactoring of the above ability. fixes issue #2219 Signed-off-by: baude <bbaude@redhat.com>
* ginkgo status improvementsbaude2019-03-08
| | | | | | | a series of improvements to our ginkgo test framework so we can get better ideas of whats going on when run in CI Signed-off-by: baude <bbaude@redhat.com>
* Run integrations test with remote-clientbaude2019-01-14
| | | | | | | | | | | | Add the ability to run the integration (ginkgo) suite using the remote client. Only the images_test.go file is run right now; all the rest are isolated with a // +build !remotelinux. As more content is developed for the remote client, we can unblock the files and just block single tests as needed. Signed-off-by: baude <bbaude@redhat.com>
* Separate common used test functions and structs to test/utilsYiqiao Pu2018-11-16
| | | | | | | Put common used test functions and structs to a separated package. So we can use them for more testsuites. Signed-off-by: Yiqiao Pu <ypu@redhat.com>
* allow ppc64le to pass libpod integration testsbaude2018-10-31
| | | | | | | | | | | | | | this pr allows the libpod integration suite to pass on the ppc64le architecture. in some cases, I had to skip tests. eventually, these tests need to be fixed so that they properly pass. of note for this PR is: * changed the ppc64le default container os to be overlay (over vfs) as vfs seems non-performant on ppc64le * still run vfs for rootless operations * some images names for ppc64le had to change because they don't exist. * this should help getting our CI to run on the platform Signed-off-by: baude <bbaude@redhat.com>
* Make podman ps fastbaude2018-10-23
| | | | | | Like Ricky Bobby, we want to go fast. Signed-off-by: baude <bbaude@redhat.com>
* Show duration for each ginkgo test and test speed improvementsbaude2018-07-28
| | | | | | | | | | | | | | Because our tests are getting so long, we want to be able to audit which tests are taking the longest to complete. This may indicate a bad test, bad CI, bad code, etc and therefore should be auditable. Also, make speed improvements to tests by making sure we only unpack caches images that actually get used. Signed-off-by: baude <bbaude@redhat.com> Closes: #1178 Approved by: mheon
* podman logs: fix tailingbaude2018-02-09
| | | | | | | | | | | Fix issues with tailing of container logs as described in issue #16. Also add in the ability to use a duration or known time stamp formats for the --since flag. Signed-off-by: baude <bbaude@redhat.com> Closes: #317 Approved by: mheon
* Migrate more tests to ginkgobaude2018-02-06
Migrate the following to the ginkgo integration tests: * images * import * inspect * logs * run_dns Signed-off-by: baude <bbaude@redhat.com> Closes: #295 Approved by: mheon