2706688
From 4b1a8a87e7d297fd6669d653af7308dd9c1a513a Mon Sep 17 00:00:00 2001
d6c0b0c
From: Rich Megginson <rmeggins@redhat.com>
2706688
Date: Thu, 6 May 2021 13:52:38 -0600
2706688
Subject: [PATCH] tag 802-1x test as expfail; make sure bridge test cleans up
2706688
 properly
d6c0b0c
2706688
The 802-1x test will fail on platforms where `hostapd` is not available,
2706688
so tag that test to make it skippable.
2706688
2706688
The initscripts bridge test does not clean up properly, leaving the
2706688
device around which causes the nm test to fail.  Explicitly remove
2706688
the device for cleanup.
d6c0b0c
---
2706688
 tests/playbooks/tests_802_1x.yml |  2 ++
2706688
 tests/playbooks/tests_bridge.yml | 10 ++++++++++
2706688
 2 files changed, 12 insertions(+)
d6c0b0c
c36e15b
diff --git a/tests/playbooks/tests_802_1x.yml b/tests/playbooks/tests_802_1x.yml
2706688
index 9cce1ae..4ceebb1 100644
c36e15b
--- a/tests/playbooks/tests_802_1x.yml
c36e15b
+++ b/tests/playbooks/tests_802_1x.yml
2706688
@@ -3,6 +3,8 @@
c36e15b
 - hosts: all
c36e15b
   vars:
c36e15b
     interface: 802-1x-test
2706688
+  tags:
2706688
+    - tests::expfail
2706688
   tasks:
2706688
     - name: "INIT: 802.1x tests"
2706688
       debug:
c36e15b
diff --git a/tests/playbooks/tests_bridge.yml b/tests/playbooks/tests_bridge.yml
2706688
index d79d6ad..14b1225 100644
c36e15b
--- a/tests/playbooks/tests_bridge.yml
c36e15b
+++ b/tests/playbooks/tests_bridge.yml
2706688
@@ -49,6 +49,16 @@
c36e15b
     profile: "{{ interface }}"
2706688
     task: tasks/assert_profile_absent.yml
c36e15b
 
c36e15b
+- name: Remove test bridge
c36e15b
+  hosts: all
c36e15b
+  tags:
2706688
+    - tests::cleanup
c36e15b
+  tasks:
2706688
+    - name: Remove the test interface
2706688
+      command: ip link delete {{ interface | quote }}
c36e15b
+      ignore_errors: yes
2706688
+      changed_when: false
c36e15b
+
2706688
 # FIXME: Devices might still be left when profile is absent
2706688
 # - import_playbook: run_tasks.yml
2706688
 #   vars:
d6c0b0c
-- 
d6c0b0c
2.30.2
d6c0b0c