From 56e3a671a5b8c70eb89f8545894a22991c7f9af8 Mon Sep 17 00:00:00 2001 From: Anas Husseini Date: Fri, 2 Aug 2024 16:13:45 +0300 Subject: [PATCH] install required slices in tests --- tests/spread/integration/adduser/task.yaml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/tests/spread/integration/adduser/task.yaml b/tests/spread/integration/adduser/task.yaml index c446946b0..678f05db2 100644 --- a/tests/spread/integration/adduser/task.yaml +++ b/tests/spread/integration/adduser/task.yaml @@ -1,13 +1,10 @@ summary: Integration tests for adduser execute: | - rootfs="$(install-slices adduser_bins)" - mkdir -p "$rootfs/{bin,lib,lib64}" - cp /bin/bash "$rootfs/bin" - chroot "$rootfs" + rootfs="$(install-slices base-files_base bash_bins coreutils_bins adduser_bins)" - test -f /etc/passwd - adduser --quiet --system testuser - grep testuser /etc/passwd - deluser --quiet testuser - ! grep testuser /etc/passwd + chroot "$rootfs" test -f /etc/passwd + chroot "$rootfs" adduser --quiet --system testuser + chroot "$rootfs" grep testuser /etc/passwd + chroot "$rootfs" deluser --quiet testuser + chroot "$rootfs" grep -v testuser /etc/passwd