aboutsummaryrefslogtreecommitdiff
path: root/test/system/090-events.bats
Commit message (Collapse)AuthorAge
* system tests: periodic cleanup and fixesEd Santiago2022-09-12
| | | | | | | | | - basic : add actual log-level tests - events : clean up, add --format tests - systemd : reorder proxy args for legibility - auto-update : fix missing timeout that could lead to hang Signed-off-by: Ed Santiago <santiago@redhat.com>
* fix race where podman events exits to earlyPaul Holzinger2022-09-12
| | | | | | | In order to display all events we have to read until the event channel is closed. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* event backend none: return an error when reading eventsPaul Holzinger2022-09-12
| | | | | | | | | podman --events-backend none events should return with an error since it will never be able to actually list events. Fixes part three of #15688 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* fix hang with podman events file loggerPaul Holzinger2022-09-12
| | | | | | | | | | | | | podman --events-backend file events --stream=false should never hang. The problem is that our tail library will wait for the file to be created which makes sense when we do not run with --stream=false. To fix this we can just always create the file when the logger is initialized. This would also help to report errors early on in case the file is not accessible. Fixes part one from #15688 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* emit container labels also for container exited and exec died eventsHarald Albrecht2022-09-06
| | | | | | | - adds unit test for container labels on container die event - implements #15617 Signed-off-by: Harald Albrecht <harald.albrecht@gmx.net>
* podman rmi: emit untag eventsValentin Rothberg2022-08-27
| | | | | | | Emit untag events for each tag when removing an image. Fixes: #15485 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* Add podman events -f to be alias for --filterDaniel J Walsh2022-07-13
| | | | | | Needed for Docker compatibility. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Merge pull request #13971 from rhatdan/codespellOpenShift Merge Robot2022-04-22
|\ | | | | [CI:DOCS] Run codespell on code
| * Run codespell on codeDaniel J Walsh2022-04-22
| | | | | | | | | | | | [NO NEW TESTS NEEDED] Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | system tests: add assert(), and start using itEd Santiago2022-04-20
|/ | | | | | | | | | | | | | | | | | | | | Problem: the system test 'is()' checker was poorly thought out. For example, there is no way to check for inequality or for absence of a substring. Solution, step 1: introduce new assert(), copied almost verbatim from buildah, where it has been successful in addressing the gaps in is(). The logical next step is to search the tests for 'die' and for 'run', looking for negative assertions which we can replace with assert(). There were a lot, and in the process I found a number of ugly bugs in the tests themselves. I've taken the liberty of fixing these. Important note: at this time we have both assert() and is(). Replacing all instances of is() would be impossible to review. Signed-off-by: Ed Santiago <santiago@redhat.com>
* Add log rotation based on log sizeNiall Crowe2022-04-14
| | | | | | | | | | | | Add new functions to logfile.go for rotating and truncating the events log file once the log file and its contents exceed the maximum size limit while keeping 50% of the log file's content Also add tests to verify log rotation and truncation Signed-off-by: Niall Crowe <nicrowe@redhat.com> Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* use events_logfile_path from containers.conf for events log.Daniel J Walsh2022-01-13
| | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Error logs --follow if events-backend != journald, event-logger=journaldDaniel J Walsh2021-11-13
| | | | | | Fixes: https://github.com/containers/podman/issues/11255 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Add no-trunc support to podman-eventsDaniel J Walsh2021-09-16
| | | | | | | | | | | Standardize on no-trunc through the code. Alias notruncate where necessary. Standardize on the man page display of no-trunc. Fixes: https://github.com/containers/podman/issues/8941 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* Ensure journald events tests only run where supportedMatthew Heon2021-07-21
| | | | | | | | | We don't support the journald events backend on RHEL8, for example. So we can't unconditionally run these tests. Partial fix for RHBZ1955166 Signed-off-by: Matthew Heon <mheon@redhat.com>
* Merge pull request #10561 from vrothberg/fix-remote-events-labelOpenShift Merge Robot2021-06-07
|\ | | | | remote events: support labels
| * remote events: support labelsValentin Rothberg2021-06-04
| | | | | | | | | | | | | | | | Certain event meta data was lost when converting the remote events to libpod events and vice versa. Enable the skipped system tests for remote. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | remote events: fix --stream=falseValentin Rothberg2021-06-04
|/ | | | | | | | | | | Fix a bug in remote events where only one event would be sent if when streaming is turned off. The source of the bug was that the handler attempted to implement the streaming logic and did it wrong. The fix is rather simple by removing this logic from the handler and let the events backend handle streaming. Fixes: #10529 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* events: support disjunctive filtersValentin Rothberg2021-06-02
| | | | | | | | | While different filters are applied in conjunction, the same filter (but with different values) should be applied in disjunction. This allows, for instance, to query the events of two containers. Fixes: #10507 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* add libimage eventsValentin Rothberg2021-05-20
| | | | | | | libimage now supports events which `libpod.Runtime` now uses for image events. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* System tests: cleanup, make more robustEd Santiago2020-10-26
| | | | | | | | | | | | - run test: preserve --runtime test: use a random executable path. And, clean up better. - run test: "look up correct image name" test: use random strings; test both without and with a :tag - events test: use random label strings, add more filter tests Signed-off-by: Ed Santiago <santiago@redhat.com>
* filter events by labelsbaude2020-10-23
adding the ability to filter evens by the container labels. this requires that container labels be added to the events data being recorded and subsequently read. Signed-off-by: baude <bbaude@redhat.com>