tests(integration): add more tests.
This commit is contained in:
parent
d121092c56
commit
449c8d3e3a
3 changed files with 105 additions and 0 deletions
28
tests/bats/chsh.bats
Normal file
28
tests/bats/chsh.bats
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#!/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
|
||||
|
||||
setup_file() {
|
||||
aa_setup
|
||||
}
|
||||
|
||||
# bats test_tags=chsh
|
||||
@test "chsh: [l]ist available shells" {
|
||||
chsh --list-shells
|
||||
aa_check
|
||||
}
|
||||
|
||||
# bats test_tags=chsh
|
||||
@test "chsh: Set a specific login [s]hell for the current user" {
|
||||
chsh --shell /usr/bin/bash
|
||||
aa_check
|
||||
}
|
||||
|
||||
# bats test_tags=chsh
|
||||
@test "chsh: Set a login [s]hell for a specific user" {
|
||||
sudo chsh --shell /usr/bin/sh root
|
||||
aa_check
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue