Skip to content

Commit

Permalink
test: Adjust ostree rollback test to new rpm-ostree behaviour
Browse files Browse the repository at this point in the history
Previously, when rolling back from base.2 to base.1, base.2 appeared
again as normal available update. Now rpm-ostree flips between the two
with "rollback" and reverses the order.

Both behaviours make sense and got ack'ed by upstream, so expect the new
behaviour for current fedora-atomic.

Also verify that the order is as expected for the old behaviour.
  • Loading branch information
martinpitt committed May 14, 2018
1 parent 7fca552 commit cf3bfb4
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions test/verify/check-ostree
Original file line number Diff line number Diff line change
Expand Up @@ -326,15 +326,30 @@ class OstreeRestartCase(MachineCase):
m.start_cockpit()
b.reload()
b.login_and_go("/updates")

# After reboot upgrade but no rollback target
b.wait_present('table.listing-ct')
b.wait_present('table.listing-ct tbody')
b.wait_present('table.listing-ct tbody:nth-child(3) i.fa-circle')
b.wait_in_text("table.listing-ct tbody:nth-child(3) div.listing-ct-actions button", "Update")
b.wait_present('table.listing-ct tbody:nth-child(4) i.fa-check-circle-o')

if m.image in ["fedora-atomic"]:
# newer rpm-ostree flips back and forth between the two latest releases with rollback
b.wait_present('table.listing-ct tbody:nth-child(3) i.fa-check-circle-o')
b.wait_text('table.listing-ct tbody:nth-child(3) div.listing-ct-head h3', name + " cockpit-base.1")
b.wait_in_text("table.listing-ct tbody:nth-child(3) div.listing-ct-head", "Running")

b.wait_present('table.listing-ct tbody:nth-child(4) i.fa-circle')
b.wait_text('table.listing-ct tbody:nth-child(4) div.listing-ct-head h3', name + " cockpit-base.2")
b.wait_present("table.listing-ct tbody:nth-child(4) div.listing-ct-head button")
b.wait_in_text("table.listing-ct tbody:nth-child(4) div.listing-ct-head button", "Roll Back")
else:
# older rpm-ostree doesn't "roll back" forwards to the current release, it appears as regular update
b.wait_present('table.listing-ct tbody:nth-child(3) i.fa-circle')
b.wait_text('table.listing-ct tbody:nth-child(3) div.listing-ct-head h3', name + " cockpit-base.2")
b.wait_in_text("table.listing-ct tbody:nth-child(3) div.listing-ct-actions button", "Update")

b.wait_present('table.listing-ct tbody:nth-child(4) i.fa-check-circle-o')
b.wait_text('table.listing-ct tbody:nth-child(4) div.listing-ct-head h3', name + " cockpit-base.1")
b.wait_not_present("button:contains('Roll Back')");

b.wait_not_present('table.listing-ct tbody:nth-child(5)')
b.wait_not_present("button:contains('Roll Back')");

self.allow_restart_journal_messages()

Expand Down

0 comments on commit cf3bfb4

Please sign in to comment.