Skip to content

Commit 996d652

Browse files
committed
Optimize systemd-resolved package uninstallation
1 parent 2a3aefa commit 996d652

File tree

1 file changed

+6
-18
lines changed

1 file changed

+6
-18
lines changed

test/suites/osconfig/systemd-resolved.robot

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Documentation Verify MicroShift host name resolution with and without syst
44
Resource ../../resources/common.resource
55
Resource ../../resources/microshift-host.resource
66
Resource ../../resources/microshift-process.resource
7+
Resource ../../resources/ostree.resource
78
Resource ../../resources/ostree-health.resource
89
Resource ../../resources/systemd.resource
910

@@ -131,31 +132,18 @@ Uninstall Systemd-Resolved
131132
[Documentation] Remove the systemd-resolved package
132133
133134
${is_ostree}= Is System OSTree
134-
IF ${is_ostree} == ${TRUE}
135-
${stdout} ${stderr} ${rc}= Execute Command
136-
... rpm-ostree override remove systemd-resolved
137-
... sudo=True return_rc=True return_stdout=True return_stderr=True
138-
Should Be Equal As Integers 0 ${rc}
135+
IF ${is_ostree} == ${TRUE} Create Usr Directory Overlay
139136

140-
Reboot MicroShift Host
141-
Wait Until Greenboot Health Check Exited
142-
ELSE
143-
${stdout} ${stderr} ${rc}= Execute Command
144-
... dnf remove -y systemd-resolved
145-
... sudo=True return_rc=True return_stdout=True return_stderr=True
146-
Should Be Equal As Integers 0 ${rc}
147-
END
137+
${stdout} ${stderr} ${rc}= Execute Command
138+
... rpm -ev systemd-resolved
139+
... sudo=True return_rc=True return_stdout=True return_stderr=True
140+
Should Be Equal As Integers 0 ${rc}
148141

149142
Restore Systemd-Resolved
150143
[Documentation] Install the systemd-resolved package
151144
152145
${is_ostree}= Is System OSTree
153146
IF ${is_ostree} == ${TRUE}
154-
${stdout} ${stderr} ${rc}= Execute Command
155-
... rpm-ostree rollback
156-
... sudo=True return_rc=True return_stdout=True return_stderr=True
157-
Should Be Equal As Integers 0 ${rc}
158-
159147
Reboot MicroShift Host
160148
Wait Until Greenboot Health Check Exited
161149
ELSE

0 commit comments

Comments
 (0)