From 3773e300f09543ed2a20b72ac31d607b6a524698 Mon Sep 17 00:00:00 2001
From: Rafael Guterres Jeffman <rjeffman@redhat.com>
Date: Fri, 11 Nov 2022 13:19:08 -0300
Subject: [PATCH] netgroup: Fix environment cleanup on ipanetgroup tests.

Tests for ipanetgroup were not correctly clearing up the tests, causing
test failures when running them in some specific order.

By fixing the 'name' attribute list the tests succeed, independently of
the order they are executed.
---
 tests/netgroup/test_netgroup_member.yml        | 6 ++++--
 tests/netgroup/test_netgroup_member_absent.yml | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/tests/netgroup/test_netgroup_member.yml b/tests/netgroup/test_netgroup_member.yml
index 3fc00246..c8365422 100644
--- a/tests/netgroup/test_netgroup_member.yml
+++ b/tests/netgroup/test_netgroup_member.yml
@@ -45,7 +45,8 @@
         ipaadmin_password: SomeADMINpassword
         ipaapi_context: "{{ ipa_context | default(omit) }}"
         name:
-        - TestNetgroup1,admins
+        - TestNetgroup1
+        - admins
         state: absent
 
     # CREATE TEST ITEMS
@@ -155,5 +156,6 @@
         ipaadmin_password: SomeADMINpassword
         ipaapi_context: "{{ ipa_context | default(omit) }}"
         name:
-        - TestNetgroup1,admins
+        - TestNetgroup1
+        - admins
         state: absent
diff --git a/tests/netgroup/test_netgroup_member_absent.yml b/tests/netgroup/test_netgroup_member_absent.yml
index 3ccd36d5..14376cd2 100644
--- a/tests/netgroup/test_netgroup_member_absent.yml
+++ b/tests/netgroup/test_netgroup_member_absent.yml
@@ -45,7 +45,8 @@
         ipaadmin_password: SomeADMINpassword
         ipaapi_context: "{{ ipa_context | default(omit) }}"
         name:
-        - TestNetgroup1,admins
+        - TestNetgroup1
+        - admins
         state: absent
 
     # CREATE TEST ITEMS
@@ -202,5 +203,6 @@
         ipaadmin_password: SomeADMINpassword
         ipaapi_context: "{{ ipa_context | default(omit) }}"
         name:
-        - TestNetgroup1,admins
+        - TestNetgroup1
+        - admins
         state: absent
-- 
GitLab