test: update integration tests.
This commit is contained in:
parent
8e2a7e8068
commit
1204e29fb9
9 changed files with 192 additions and 8 deletions
|
|
@ -14,7 +14,7 @@ load ../common
|
|||
}
|
||||
|
||||
@test "df: Display the filesystem and its disk usage containing the given file or directory" {
|
||||
df apparmor.d/
|
||||
df /etc/apparmor.d/
|
||||
}
|
||||
|
||||
@test "df: Include statistics on the number of free inodes" {
|
||||
|
|
|
|||
14
tests/integration/utils/eject.bats
Normal file
14
tests/integration/utils/eject.bats
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env bats
|
||||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2024 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
load ../common
|
||||
|
||||
@test "eject: Display the default device" {
|
||||
eject -d || true
|
||||
}
|
||||
|
||||
@test "eject: Eject the default device" {
|
||||
eject || true
|
||||
}
|
||||
19
tests/integration/utils/hwclock.bats
Normal file
19
tests/integration/utils/hwclock.bats
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env bats
|
||||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2024 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
load ../common
|
||||
|
||||
@test "hwclock: Display the current time as reported by the hardware clock" {
|
||||
hwclock
|
||||
}
|
||||
|
||||
@test "hwclock: Write the current software clock time to the hardware clock (sometimes used during system setup)" {
|
||||
hwclock --systohc
|
||||
}
|
||||
|
||||
@test "hwclock: Write the current hardware clock time to the software clock" {
|
||||
hwclock --hctosys
|
||||
}
|
||||
|
||||
18
tests/integration/utils/zramctl.bats
Normal file
18
tests/integration/utils/zramctl.bats
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env bats
|
||||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2024 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
load ../common
|
||||
|
||||
@test "zramctl: Check if zram is enabled; enable it if needed" {
|
||||
lsmod | grep -i zram || sudo modprobe zram
|
||||
}
|
||||
|
||||
@test "zramctl: Find and initialize the next free zram device to a 1 GB virtual drive using LZ4 compression" {
|
||||
sudo zramctl --find --size 1GB --algorithm lz4
|
||||
}
|
||||
|
||||
@test "zramctl: List currently initialized devices" {
|
||||
sudo zramctl
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue