2024-10-22 00:36:51 +02:00
|
|
|
#!/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
|
|
|
|
|
2024-11-19 22:27:04 +01:00
|
|
|
@test "ip-address: List network interfaces and their associated IP addresses" {
|
2024-10-22 00:36:51 +02:00
|
|
|
ip address
|
|
|
|
}
|
|
|
|
|
2024-11-19 22:27:04 +01:00
|
|
|
@test "ip-address: Filter to show only active network interfaces" {
|
|
|
|
ip address show up
|
2024-10-22 00:36:51 +02:00
|
|
|
}
|
|
|
|
|
2024-11-19 22:27:04 +01:00
|
|
|
@test "ip-route: Display the routing table" {
|
2024-10-22 00:36:51 +02:00
|
|
|
ip route
|
|
|
|
}
|
|
|
|
|
2024-11-19 22:27:04 +01:00
|
|
|
@test "ip-route-get: Print route to a destination" {
|
|
|
|
ip route get 1.1.1.1
|
|
|
|
}
|
|
|
|
|
|
|
|
@test "ip link: Show information about all network interfaces" {
|
|
|
|
ip link
|
|
|
|
}
|
|
|
|
|
|
|
|
@test "ip neighbour: Display the neighbour/ARP table entries" {
|
2024-10-22 00:36:51 +02:00
|
|
|
ip neighbour
|
|
|
|
}
|
|
|
|
|
2024-11-19 22:27:04 +01:00
|
|
|
@test "ip rule: Display the routing policy" {
|
|
|
|
ip rule show
|
|
|
|
ip rule list
|
|
|
|
}
|
|
|
|
|
2024-11-12 22:42:31 +01:00
|
|
|
@test "ip: Manage network namespace" {
|
|
|
|
sudo ip netns add foo
|
|
|
|
sudo ip netns list
|
|
|
|
sudo ip netns exec foo bash -c "pwd"
|
|
|
|
sudo ip netns delete foo
|
|
|
|
}
|