Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions test/suites/osconfig/systemd-resolved.robot
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ Verify Kubelet Config With Systemd-Resolved Running
Restart MicroShift

# Verify the presence of the kubelet option
${rc}= Execute Command
... grep -q "resolvConf: ${RESOLVE_CONF_FILE}" ${KUBELET_CONFIG_FILE}
... sudo=True return_rc=True return_stdout=False return_stderr=False
${rc}= Check ResolveConf Option Presence
Should Be Equal As Integers 0 ${rc}

[Teardown] Run Keywords
Expand All @@ -48,9 +46,7 @@ Verify Kubelet Config With Systemd-Resolved Disabled
Restart MicroShift

# Verify the absence of the kubelet option
${rc}= Execute Command
... grep -q "resolvConf: ${RESOLVE_CONF_FILE}" ${KUBELET_CONFIG_FILE}
... sudo=True return_rc=True return_stdout=False return_stderr=False
${rc}= Check ResolveConf Option Presence
Should Not Be Equal As Integers 0 ${rc}

Verify Kubelet Config With Systemd-Resolved Uninstalled
Expand All @@ -64,9 +60,7 @@ Verify Kubelet Config With Systemd-Resolved Uninstalled
Restart MicroShift

# Verify the absence of the kubelet option
${rc}= Execute Command
... grep -q "resolvConf: ${RESOLVE_CONF_FILE}" ${KUBELET_CONFIG_FILE}
... sudo=True return_rc=True return_stdout=False return_stderr=False
${rc}= Check ResolveConf Option Presence
Should Not Be Equal As Integers 0 ${rc}

# Revert the system to the original configuration
Expand Down Expand Up @@ -170,3 +164,12 @@ Restore Systemd-Resolved
... sudo=True return_rc=True return_stdout=True return_stderr=True
Should Be Equal As Integers 0 ${rc}
END

Check ResolveConf Option Presence
[Documentation] Check if the 'resolvConf' option is present in the kubelet
... configuration file. Return a none-zero code if not present.

${rc}= Execute Command
... grep -qE "^resolvConf:.*${RESOLVE_CONF_FILE}" ${KUBELET_CONFIG_FILE}
... sudo=True return_rc=True return_stdout=False return_stderr=False
RETURN ${rc}
Comment thread
ggiguash marked this conversation as resolved.