diff --git a/tests/prepare/shell/test.sh b/tests/prepare/shell/test.sh index 00731cf9d4..ec2a21b94a 100755 --- a/tests/prepare/shell/test.sh +++ b/tests/prepare/shell/test.sh @@ -57,15 +57,15 @@ rlJournalStart fi rlPhaseEnd - # TODO: #4785 Preparing from a remote script is broken in Image Mode - if [ "$IMAGE_MODE" != "yes" ]; then - rlPhaseStartTest "Remote Script" - rlRun -s "tmt -vvv run provision --how=$PROVISION_HOW $image_opt prepare finish cleanup plan -n url" 0 "Prepare using a remote script" - rlAssertGrep "Hello world" "$rlRun_LOG" #check for the prepare script + # TODO: #4785 Preparing from a remote script is broken in Image Mode (finish) + rlPhaseStartTest "Remote Script" + rlRun -s "tmt -vvv run provision --how=$PROVISION_HOW $image_opt prepare finish cleanup plan -n url" 0 "Prepare using a remote script" + rlAssertGrep "Hello world" "$rlRun_LOG" #check for the prepare script + if [ "$IMAGE_MODE" != "yes" ]; then rlAssertGrep "third" "$rlRun_LOG" # check for the finish script - assert_image_mode - rlPhaseEnd - fi + fi + assert_image_mode + rlPhaseEnd done <<< "$IMAGES" rlPhaseStartCleanup diff --git a/tmt/package_managers/bootc.py b/tmt/package_managers/bootc.py index b2287dc718..48e66388e5 100644 --- a/tmt/package_managers/bootc.py +++ b/tmt/package_managers/bootc.py @@ -259,7 +259,8 @@ def build_container(self) -> Optional[CommandOutput]: ) ) self.guest.execute( - ShellScript(f'cat < {containerfile_path!s} \n{containerfile} \nEOF') + # Quoted delimiter disables any shell expansions + ShellScript(f'cat <<"EOF" > {containerfile_path!s} \n{containerfile} \nEOF') ) self.debug(f"containerfile content: {containerfile}")