tests: minor tests improvment.
Some checks are pending
Ubuntu / check (push) Waiting to run
Ubuntu / build (default, ubuntu-22.04) (push) Blocked by required conditions
Ubuntu / build (default, ubuntu-24.04) (push) Blocked by required conditions
Ubuntu / build (full-system-policy, ubuntu-22.04) (push) Blocked by required conditions
Ubuntu / build (full-system-policy, ubuntu-24.04) (push) Blocked by required conditions
Ubuntu / tests (push) Blocked by required conditions

This commit is contained in:
Alexandre Pujol 2024-11-13 13:52:36 +00:00
parent b4bcb2f16e
commit a1c6e79dc7
Failed to generate hash of commit
7 changed files with 12 additions and 15 deletions

View file

@ -15,6 +15,7 @@ jobs:
build: build:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
needs: check
strategy: strategy:
matrix: matrix:
os: os:
@ -93,7 +94,6 @@ jobs:
sudo apt-get install -y \ sudo apt-get install -y \
apparmor-profiles apparmor-utils \ apparmor-profiles apparmor-utils \
bats bats-support bats bats-support
bash tests/requirements.sh
- name: Install apparmor.d - name: Install apparmor.d
run: | run: |
@ -101,6 +101,12 @@ jobs:
sudo dpkg --install .pkg/apparmor.d_*_amd64.deb || true sudo dpkg --install .pkg/apparmor.d_*_amd64.deb || true
sudo systemctl restart apparmor.service sudo systemctl restart apparmor.service
- name: Github Action specific requirements
run: |
bash tests/requirements.sh
sudo systemctl restart systemd-hostnamed
sudo systemctl restart snapd
- name: Run the bats integration tests - name: Run the bats integration tests
run: | run: |
make bats make bats

View file

@ -24,10 +24,9 @@
network netlink raw, # PAM network netlink raw, # PAM
dbus send bus=system path=/org/freedesktop/login1 unix bind type=stream addr=@@{hex16}/bus/sudo/system,
interface=org.freedesktop.logi1.Manager
member=CreateSession #aa:dbus talk bus=system name=org.freedesktop.login1 label=systemd-logind
peer=(name=org.freedesktop.login1, label=systemd-logind),
dbus (send receive) bus=session path=/org/freedesktop/systemd1 dbus (send receive) bus=session path=/org/freedesktop/systemd1
interface=org.freedesktop.systemd.Manager interface=org.freedesktop.systemd.Manager

View file

@ -31,8 +31,6 @@ profile sudo @{exec_path} flags=(attach_disconnected) {
signal (send) set=(winch) peer=pacman, signal (send) set=(winch) peer=pacman,
signal (send) set=(winch, hup, term) peer=rpm, signal (send) set=(winch, hup, term) peer=rpm,
unix bind type=stream addr=@@{hex16}/bus/sudo/system/,
@{bin}/@{shells} rUx, @{bin}/@{shells} rUx,
@{lib}/** PUx, @{lib}/** PUx,
/opt/*/** PUx, /opt/*/** PUx,

View file

@ -7,6 +7,7 @@ load common
setup_file() { setup_file() {
aa_setup aa_setup
skip
} }
# bats test_tags=homectl # bats test_tags=homectl

View file

@ -7,7 +7,6 @@ load common
setup_file() { setup_file() {
aa_setup aa_setup
skip
} }
# bats test_tags=snap # bats test_tags=snap

View file

@ -27,12 +27,6 @@ setup_file() {
aa_check aa_check
} }
# bats test_tags=systemd-id128
@test "systemd-id128: Print the identifier of the current service invocation (this is available in systemd services)" {
systemd-id128 invocation-id
aa_check
}
# bats test_tags=systemd-id128 # bats test_tags=systemd-id128
@test "systemd-id128: Generate a new random identifier and print it as a UUID (five groups of digits separated by hyphens)" { @test "systemd-id128: Generate a new random identifier and print it as a UUID (five groups of digits separated by hyphens)" {
systemd-id128 new --uuid systemd-id128 new --uuid

View file

@ -19,7 +19,7 @@ arch)
;; ;;
debian | ubuntu | whonix) debian | ubuntu | whonix)
sudo apt-get install -y \ sudo apt-get install -y \
cpuid dfc systemd-userdbd cpuid dfc systemd-userdbd systemd-homed tlp
;; ;;
opensuse*) opensuse*)
;; ;;