test: update integration tests.
This commit is contained in:
parent
8e2a7e8068
commit
1204e29fb9
9 changed files with 192 additions and 8 deletions
29
tests/integration/hostname.bats
Normal file
29
tests/integration/hostname.bats
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#!/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 "hostname: Show current host name" {
|
||||
hostname
|
||||
}
|
||||
|
||||
@test "hostname: Show the network address of the host name" {
|
||||
hostname -i
|
||||
}
|
||||
|
||||
@test "hostname: Show all network addresses of the host" {
|
||||
hostname -I
|
||||
}
|
||||
|
||||
@test "hostname: Show the FQDN (Fully Qualified Domain Name)" {
|
||||
hostname --fqdn
|
||||
}
|
||||
|
||||
@test "hostname: Set current host name" {
|
||||
name=$(hostname)
|
||||
sudo hostname "new-$(hostname)"
|
||||
sudo hostname "$name"
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue