Skip to content
Merged
Show file tree
Hide file tree
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
17 changes: 17 additions & 0 deletions test/resources/ostree.resource
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,20 @@ Expected Boot Count
... sudo=True return_rc=False

Should Be Equal As Integers ${reboot_count} ${stdout}

Create Usr Directory Overlay
[Documentation] Make /usr dir writable by creating an overlay, rebooting
... will go back to being immutable.

${is_bootc}= Is System Bootc
IF ${is_bootc}
${cmd}= Set Variable bootc usr-overlay
ELSE
${cmd}= Set Variable rpm-ostree usroverlay
END

${stdout} ${stderr} ${rc}= Execute Command
... ${cmd}
... sudo=True return_rc=True
... return_stdout=True return_stderr=True
Should Be Equal As Integers 0 ${rc}
14 changes: 6 additions & 8 deletions test/suites/greenboot/greenboot.robot
Original file line number Diff line number Diff line change
Expand Up @@ -93,21 +93,19 @@ Cleanup User Workload

Disrupt Service
[Documentation] Prevent Microshift service from starting correctly.
${is_ostree}= Is System OSTree

${stdout} ${rc}= Execute Command
... which hostname
... sudo=False return_rc=True
IF ${rc} == 0 Set Suite Variable \${HOSTNAME_BIN_PATH} ${stdout}

${cmd}= Set Variable sudo chmod 000 ${HOSTNAME_BIN_PATH}
IF ${is_ostree}
${cmd}= Set Variable sudo rpm-ostree usroverlay && sudo chmod 000 ${HOSTNAME_BIN_PATH}
END
# This covers both ostree and bootc systems
${is_ostree}= Is System OSTree
IF ${is_ostree} Create Usr Directory Overlay

${stdout} ${rc}= Execute Command
... ${cmd}
... sudo=False return_rc=True
${rc}= Execute Command
... chmod 000 ${HOSTNAME_BIN_PATH}
... sudo=True return_rc=True
Should Be Equal As Integers 0 ${rc}

Restore Service
Expand Down
8 changes: 1 addition & 7 deletions test/suites/standard2/kustomize.robot
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Resource ../../resources/common.resource
Resource ../../resources/systemd.resource
Resource ../../resources/microshift-config.resource
Resource ../../resources/microshift-process.resource
Resource ../../resources/ostree.resource
Resource ../../resources/ostree-health.resource

Suite Setup Setup Suite
Expand Down Expand Up @@ -235,13 +236,6 @@ ConfigMap Should Be Missing
... shell=True
Should Be Equal As Integers ${result.rc} 1

Create Usr Directory Overlay
[Documentation] Make /usr dir writable by creating an overlay, rebooting will go back to being immutable.
${stdout} ${rc}= Execute Command
... rpm-ostree usroverlay
... sudo=True return_rc=True
Should Be Equal As Integers 0 ${rc}

Clear Manifest Directory
[Documentation] Remove the contents of the manifest directory
[Arguments] ${manifest_dir}
Expand Down