tests: add a few integration tests.
This commit is contained in:
parent
0c2385fef9
commit
d579b33011
16 changed files with 325 additions and 6 deletions
30
tests/integration/systemd/journalctl.bats
Normal file
30
tests/integration/systemd/journalctl.bats
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#!/usr/bin/env bats
|
||||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2025 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
load ../common
|
||||
|
||||
@test "journalctl: Show all messages with priority level 3 (errors) from this boot" {
|
||||
sudo journalctl -b --priority=3
|
||||
}
|
||||
|
||||
@test "journalctl: Show only the last N lines of the journal" {
|
||||
sudo journalctl --lines 100
|
||||
}
|
||||
|
||||
@test "journalctl: Show all messages by a specific [u]nit" {
|
||||
sudo journalctl --unit apparmor.service
|
||||
}
|
||||
|
||||
@test "journalctl: Show all messages by a specific process" {
|
||||
sudo journalctl _PID=1
|
||||
}
|
||||
|
||||
@test "journalctl: Show all messages by a specific executable" {
|
||||
sudo journalctl /usr/bin/bootctl
|
||||
}
|
||||
|
||||
@test "journalctl: Delete journal logs which are older than 10 seconds" {
|
||||
sudo journalctl --vacuum-time=10s
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue