summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLee Garrett <leegarrett@users.noreply.github.com>2024-11-26 01:43:40 +0100
committerGitHub <noreply@github.com>2024-11-26 01:43:40 +0100
commitf2a77b071e59ccf0b310874bb6ab1a8d642cb813 (patch)
treed892b300d8b58614f80cca58a0ce0169cef5480f
parentdnf5,apt: add auto_install_module_deps option (#84292) (diff)
downloadansible-f2a77b071e59ccf0b310874bb6ab1a8d642cb813.tar.xz
ansible-f2a77b071e59ccf0b310874bb6ab1a8d642cb813.zip
Test aliases fix (#84377)
* integrity tests: Tag (destructive) root tests as such - apt_key needs root to touch the apt key database - debconf needs root to change debconf values of system packages - gathering writes to /etc/ansible/*, writeable only to root - group creates system groups - noexec mounts/umounts a ramdisk - systemd requires root to start/stop services Mark all except noexec as "destructive" as they change the state of the system. * integration test cron requires root, as it calls setup_cron * integration test dpkg_selection runs dpkg as root * integration test facts_linux_network requires root It adds/removes IP addresses from network interfaces, requiring root for that. * integration test package requires root installs/removes system packages * Integration test service requires root Creates/starts/stops/removes systemd services * integration test user requires root to create users * integration tests using setup_test_user require root --------- Co-authored-by: Lee Garrett <lgarrett@rocketjump.eu>
-rw-r--r--test/integration/targets/apt_key/aliases2
-rw-r--r--test/integration/targets/cron/aliases1
-rw-r--r--test/integration/targets/debconf/aliases2
-rw-r--r--test/integration/targets/dpkg_selections/aliases1
-rw-r--r--test/integration/targets/facts_linux_network/aliases1
-rw-r--r--test/integration/targets/gathering/aliases2
-rw-r--r--test/integration/targets/group/aliases2
-rw-r--r--test/integration/targets/keyword_inheritance/aliases1
-rw-r--r--test/integration/targets/noexec/aliases1
-rw-r--r--test/integration/targets/omit/aliases1
-rw-r--r--test/integration/targets/package/aliases1
-rw-r--r--test/integration/targets/service/aliases1
-rw-r--r--test/integration/targets/service_facts/aliases1
-rw-r--r--test/integration/targets/systemd/aliases2
-rw-r--r--test/integration/targets/user/aliases1
15 files changed, 20 insertions, 0 deletions
diff --git a/test/integration/targets/apt_key/aliases b/test/integration/targets/apt_key/aliases
index 97f534a839..db2be7c238 100644
--- a/test/integration/targets/apt_key/aliases
+++ b/test/integration/targets/apt_key/aliases
@@ -1,3 +1,5 @@
+destructive
+needs/root
shippable/posix/group1
skip/freebsd
skip/macos
diff --git a/test/integration/targets/cron/aliases b/test/integration/targets/cron/aliases
index f3703f856d..68c7697f1d 100644
--- a/test/integration/targets/cron/aliases
+++ b/test/integration/targets/cron/aliases
@@ -1,3 +1,4 @@
destructive
+needs/root
shippable/posix/group1
skip/macos
diff --git a/test/integration/targets/debconf/aliases b/test/integration/targets/debconf/aliases
index a6dafcf8cd..196e72369b 100644
--- a/test/integration/targets/debconf/aliases
+++ b/test/integration/targets/debconf/aliases
@@ -1 +1,3 @@
+destructive
+needs/root
shippable/posix/group1
diff --git a/test/integration/targets/dpkg_selections/aliases b/test/integration/targets/dpkg_selections/aliases
index 9c44d752a6..c2e2b26ce0 100644
--- a/test/integration/targets/dpkg_selections/aliases
+++ b/test/integration/targets/dpkg_selections/aliases
@@ -1,5 +1,6 @@
shippable/posix/group1
destructive
+needs/root
skip/freebsd
skip/macos
skip/rhel
diff --git a/test/integration/targets/facts_linux_network/aliases b/test/integration/targets/facts_linux_network/aliases
index c9e1dc5585..9ed93a7376 100644
--- a/test/integration/targets/facts_linux_network/aliases
+++ b/test/integration/targets/facts_linux_network/aliases
@@ -1,4 +1,5 @@
needs/privileged
+needs/root
shippable/posix/group1
skip/freebsd
skip/macos
diff --git a/test/integration/targets/gathering/aliases b/test/integration/targets/gathering/aliases
index 1d28bdb2aa..cd3a483ac5 100644
--- a/test/integration/targets/gathering/aliases
+++ b/test/integration/targets/gathering/aliases
@@ -1,2 +1,4 @@
+destructive
+needs/root
shippable/posix/group5
context/controller
diff --git a/test/integration/targets/group/aliases b/test/integration/targets/group/aliases
index a6dafcf8cd..196e72369b 100644
--- a/test/integration/targets/group/aliases
+++ b/test/integration/targets/group/aliases
@@ -1 +1,3 @@
+destructive
+needs/root
shippable/posix/group1
diff --git a/test/integration/targets/keyword_inheritance/aliases b/test/integration/targets/keyword_inheritance/aliases
index 01741b943d..2c7f13fa79 100644
--- a/test/integration/targets/keyword_inheritance/aliases
+++ b/test/integration/targets/keyword_inheritance/aliases
@@ -1,4 +1,5 @@
shippable/posix/group4
context/controller
+needs/root
needs/target/setup_test_user
setup/always/setup_passlib_controller # required for setup_test_user
diff --git a/test/integration/targets/noexec/aliases b/test/integration/targets/noexec/aliases
index e420d4bd47..5d70d94848 100644
--- a/test/integration/targets/noexec/aliases
+++ b/test/integration/targets/noexec/aliases
@@ -1,3 +1,4 @@
+needs/root
shippable/posix/group4
context/controller
skip/docker
diff --git a/test/integration/targets/omit/aliases b/test/integration/targets/omit/aliases
index fea0458b10..96d4612169 100644
--- a/test/integration/targets/omit/aliases
+++ b/test/integration/targets/omit/aliases
@@ -1,4 +1,5 @@
shippable/posix/group5
+needs/root
needs/target/setup_test_user
context/controller
setup/always/setup_passlib_controller # required for setup_test_user
diff --git a/test/integration/targets/package/aliases b/test/integration/targets/package/aliases
index 6eae8bd8dd..8eeb0fdc15 100644
--- a/test/integration/targets/package/aliases
+++ b/test/integration/targets/package/aliases
@@ -1,2 +1,3 @@
+needs/root
shippable/posix/group1
destructive
diff --git a/test/integration/targets/service/aliases b/test/integration/targets/service/aliases
index f3703f856d..68c7697f1d 100644
--- a/test/integration/targets/service/aliases
+++ b/test/integration/targets/service/aliases
@@ -1,3 +1,4 @@
destructive
+needs/root
shippable/posix/group1
skip/macos
diff --git a/test/integration/targets/service_facts/aliases b/test/integration/targets/service_facts/aliases
index f5edf4b117..f0567c976f 100644
--- a/test/integration/targets/service_facts/aliases
+++ b/test/integration/targets/service_facts/aliases
@@ -1,2 +1,3 @@
+needs/root
shippable/posix/group2
skip/macos
diff --git a/test/integration/targets/systemd/aliases b/test/integration/targets/systemd/aliases
index a6dafcf8cd..196e72369b 100644
--- a/test/integration/targets/systemd/aliases
+++ b/test/integration/targets/systemd/aliases
@@ -1 +1,3 @@
+destructive
+needs/root
shippable/posix/group1
diff --git a/test/integration/targets/user/aliases b/test/integration/targets/user/aliases
index a4c92ef853..196e72369b 100644
--- a/test/integration/targets/user/aliases
+++ b/test/integration/targets/user/aliases
@@ -1,2 +1,3 @@
destructive
+needs/root
shippable/posix/group1