Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile: Update Cockpit lib to e8cf93050356f; fix adding disks to transient VM, and lots of test bugs #1778

Merged
merged 5 commits into from
Aug 23, 2024

Commits on Aug 22, 2024

  1. test: Close dialogs before next page interactions

    Selecting a new action from the main page while a dialog is open only
    worked with our `ph_mouse()` cheat, not with proper clicks.
    martinpitt committed Aug 22, 2024
    Configuration menu
    Copy the full SHA
    32f7204 View commit details
    Browse the repository at this point in the history
  2. test: Close OS selector before closing Create VM dialog

    Otherwise the list obscures the dialog's action buttons, so they are not
    clickable (only with `ph_mouse()` which circumvents the browser).
    martinpitt committed Aug 22, 2024
    Configuration menu
    Copy the full SHA
    41760f3 View commit details
    Browse the repository at this point in the history
  3. test: Wait until Disks table initialization before disk actions

    The disk kebabs keep jumping around while the Disk table initializes
    and re-renders, which is a race condition when trying to click on them
    with the actual browser mouse.
    
    So robustify the tests to wait for the table to be complete. This
    mitigates the issue, and also provides some nice extra validation. This
    was already done in a few places, generalize this into a `waitDisks()`
    helper.
    
    Unfortunately in some cases waiting for the entries is still not enough,
    but I can't figure out what else to wait on.. Do an extra sleep for the
    table to settle down.
    martinpitt committed Aug 22, 2024
    Configuration menu
    Copy the full SHA
    977dfb5 View commit details
    Browse the repository at this point in the history
  4. Fix adding disks to transient VMs

    TestMachinesDisks.testAddDiskDirPool's "transient VM" test case
    ommediately opened the "Add Disk" dialog after undefining the VM. This
    was a race condition which the test actually "won" in most cases: The
    `UNDEFINED` event did not yet bubble through the UI, so the "Add Disk"
    dialog still thought that the VM was persistent. Fix that by waiting
    until the UI picked up the event and considers the VM transient.
    
    This exposed a bug in the dialog's fill() function: It tried to check
    the value of the "Permanent" checkbox, but that doesn't exist at all for
    transient VMs. Fix up the logic and assert the latter for transient VMs.
    
    Now that this test is working correctly, it uncovered a bug in the code:
    Trying to add a disk to a transient VM fails with
    
    > Requested operation is not valid: transient domains do not have any persistent config
    
    because the `persistent` state was initialized to "true". Fix that.
    
    https://issues.redhat.com/browse/RHEL-17677
    martinpitt committed Aug 22, 2024
    Configuration menu
    Copy the full SHA
    9dae61d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    504c26b View commit details
    Browse the repository at this point in the history