mirror of
https://github.com/containers/podman.git
synced 2025-12-02 11:08:36 +08:00
journald logs: simplify entry parsing
It makes little sense to create a log line string from the entry just to parse it again into a LogLine. We have the typed fields so we can assemble the logLine direclty, this makes things simpler and more efficient. Also entries from the passthrough driver do not use the CONTAINER_ID_FULL field, instead we can just access c.ID() directly. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@@ -428,6 +428,12 @@ EOF
|
||||
$name stderr" "logs work with passthrough"
|
||||
done
|
||||
|
||||
# we cannot assume the ordering between a b, this depends on timing and would flake in CI
|
||||
# use --names so we do not have to get the ID
|
||||
run_podman pod logs --names test_pod
|
||||
assert "$output" =~ ".*^test_pod-a a stdout.*" "logs from container a shown"
|
||||
assert "$output" =~ ".*^test_pod-b b stdout.*" "logs from container b shown"
|
||||
|
||||
# Add a simple `auto-update --dry-run` test here to avoid too much redundancy
|
||||
# with 255-auto-update.bats
|
||||
run_podman auto-update --dry-run --format "{{.Unit}},{{.Container}},{{.Image}},{{.Updated}},{{.Policy}}"
|
||||
|
||||
Reference in New Issue
Block a user