From 73e7a7cba9dc743dafda28443bb5775b0f5f37e6 Mon Sep 17 00:00:00 2001
From: Alberto Carretero <angelalbertoc.r@gmail.com>
Date: Tue, 6 Aug 2024 11:22:50 +0200
Subject: [PATCH] chore: update spread test to latest release changes (#147)

* also change slice to base-passwd_data

Simpler slice with mutation scripts that is consistent across versions
of Chisel and we do not foresee changes to it in the near future.
---
 tests/basic/task.yaml | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/tests/basic/task.yaml b/tests/basic/task.yaml
index 03c60436..03fdb5a8 100644
--- a/tests/basic/task.yaml
+++ b/tests/basic/task.yaml
@@ -4,16 +4,18 @@ execute: |
   rootfs_folder=rootfs_${RELEASE}
   mkdir -p $rootfs_folder
   chisel cut --release ${OS}-${RELEASE} \
-    --root $rootfs_folder ca-certificates_data openssl_bins
-  
+    --root $rootfs_folder base-passwd_data openssl_bins
+
   # make sure $rootfs_folder is not empty
   ls ${rootfs_folder}/*
 
-  # with the ca-certificates mutation script, we can assert that:
-  # - etc/ssl/certs/ca-certificates.crt is not empty
-  # - usr/share/ca-certificates/mozilla/ does not exist
-  test -s ${rootfs_folder}/etc/ssl/certs/ca-certificates.crt 
-  test ! -d ${rootfs_folder}/usr/share/ca-certificates/mozilla 
+  # with the base-passwd mutation script, we can assert that:
+  # - etc/{group,passwd} are not empty and not equal to FIXME
+  # - usr/share/base-passwd/{group.master,passwd.master} do not exist
+  test -s ${rootfs_folder}/etc/group && test "$(< ${rootfs_folder}/etc/group)" != "FIXME"
+  test -s ${rootfs_folder}/etc/passwd && test "$(< ${rootfs_folder}/etc/passwd)" != "FIXME"
+  test ! -e ${rootfs_folder}/usr/share/base-passwd/group.master
+  test ! -e ${rootfs_folder}/usr/share/base-passwd/passwd.master
 
   # with the openssl pkg, both internal and external dependencies need to be met, for:
   # - libc6_libs