tests: cleanup the basic structure of integration tests.

This commit is contained in:
Alexandre Pujol 2024-11-19 21:13:25 +00:00
parent 206bc3473d
commit 7b4e01217b
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
46 changed files with 50 additions and 502 deletions

View file

@ -3,23 +3,24 @@
# Copyright (C) 2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
# bats test_tags=systemd-detect-virt
load common
@test "systemd-detect-virt: List detectable virtualization technologies" {
systemd-detect-virt --list
}
# bats test_tags=systemd-detect-virt
@test "systemd-detect-virt: Detect virtualization, print the result and return a zero status code when running in a VM or a container, and a non-zero code otherwise" {
systemd-detect-virt
systemd-detect-virt || true
}
# bats test_tags=systemd-detect-virt
@test "systemd-detect-virt: Silently check without printing anything" {
systemd-detect-virt --quiet
systemd-detect-virt --quiet || true
}
# bats test_tags=systemd-detect-virt
@test "systemd-detect-virt: Only detect hardware virtualization" {
systemd-detect-virt --vm
systemd-detect-virt --vm || true
}