Skip to content

Commit

Permalink
tests/test-admin-deploy-none: Split grub.cfg directory and file creation
Browse files Browse the repository at this point in the history
Split the creation of the directory containing grub.cfg, and the creation
of the file, so that a failure in the mkdir command will fail the test
and not attempt the touch command.

Closes: #1831
Approved by: jlebon
  • Loading branch information
Robert Fairley authored and rh-atomic-bot committed Apr 24, 2019
1 parent 144e99c commit 42573ea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test-admin-deploy-none.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ setup_os_repository "archive" "sysroot.bootloader none"
${CMD_PREFIX} ostree pull-local --repo=sysroot/ostree/repo --remote testos testos-repo testos/buildmaster/x86_64-runtime
# Test that configuring sysroot.bootloader="none" is a workaround for previous
# grub2 bootloader issue (see https://github.com/ostreedev/ostree/issues/1774)
mkdir -p sysroot/boot/grub2 && touch sysroot/boot/grub2/grub.cfg
mkdir -p sysroot/boot/grub2
touch sysroot/boot/grub2/grub.cfg
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os testos testos/buildmaster/x86_64-runtime > out.txt
assert_file_has_content out.txt "Bootloader updated.*"
assert_file_has_content sysroot/boot/loader/entries/ostree-1-testos.conf 'options.* root=LABEL=MOO'
Expand Down

0 comments on commit 42573ea

Please sign in to comment.