vmcheck/test-misc-2: Fix $cursor variable

Minor cleanup.

Follow up from https://github.com/coreos/rpm-ostree/pull/2461/.
This commit is contained in:
Kelvin Fan 2021-01-20 12:04:11 -05:00 committed by OpenShift Merge Robot
parent 402912e030
commit 7586503ee2

View File

@ -53,12 +53,10 @@ if vm_rpmostree finalize-deployment; then
elif vm_rpmostree finalize-deployment WRONG_CHECKSUM; then elif vm_rpmostree finalize-deployment WRONG_CHECKSUM; then
assert_not_reached "finalized with wrong checksum" assert_not_reached "finalized with wrong checksum"
fi fi
vm_cmd journalctl --after-cursor "'$from_cursor'" -u rpm-ostreed -o json | jq -r '.AGENT//""' > agent.txt vm_cmd journalctl --after-cursor "'$cursor'" -u rpm-ostreed -o json | jq -r '.AGENT//""' > agent.txt
assert_file_has_content agent.txt testing-agent-id assert_file_has_content agent.txt testing-agent-id
cursor=$(vm_get_journal_cursor) vm_cmd journalctl --after-cursor "'$cursor'" -u rpm-ostreed -o json | jq -r '.AGENT_SD_UNIT//""' > agent_sd_unit.txt
vm_cmd journalctl --after-cursor "'$from_cursor'" -u rpm-ostreed -o json | jq -r '.AGENT_SD_UNIT//""' > agent_sd_unit.txt
assert_file_has_content agent_sd_unit.txt sshd.service assert_file_has_content agent_sd_unit.txt sshd.service
cursor=$(vm_get_journal_cursor)
vm_reboot_cmd rpm-ostree finalize-deployment "${commit}" vm_reboot_cmd rpm-ostree finalize-deployment "${commit}"
assert_streq "$(vm_get_booted_csum)" "${commit}" assert_streq "$(vm_get_booted_csum)" "${commit}"
vm_assert_journal_has_content $cursor "Finalized deployment; rebooting into ${commit}" vm_assert_journal_has_content $cursor "Finalized deployment; rebooting into ${commit}"