summaryrefslogtreecommitdiff
path: root/tests/test-aerocore-anaconda-profile.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-aerocore-anaconda-profile.sh')
-rwxr-xr-xtests/test-aerocore-anaconda-profile.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test-aerocore-anaconda-profile.sh b/tests/test-aerocore-anaconda-profile.sh
new file mode 100755
index 0000000..3b3bb61
--- /dev/null
+++ b/tests/test-aerocore-anaconda-profile.sh
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+
+project_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
+profile="${project_root}/installer/system_files/overrides/etc/anaconda/profile.d/aerocore.conf"
+build_script="${project_root}/installer/build.sh"
+
+grep -qx 'profile_id = aerocore' "${profile}"
+grep -qx 'os_id = aerocore' "${profile}"
+grep -Fqx "sed -i 's/^ID=.*/ID=aerocore/' /usr/lib/os-release" "${build_script}"
+
+if grep -Eq '^[[:space:]]*(UserSpoke|anaconda-screen-accounts)[[:space:]]*$' "${profile}"; then
+ echo "AeroCore's Anaconda profile must leave account creation visible" >&2
+ exit 1
+fi