-
Notifications
You must be signed in to change notification settings - Fork 90
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
Fix testLifecycleOperationsUser restart test, add debug logging #1327
Fix testLifecycleOperationsUser restart test, add debug logging #1327
Conversation
Add a debug() API that gets enabled with `window.debugging = "podman"`, similar to how our other Cockpit projects work. Log all REST calls and monitor events.
We hvae to wait until the action menu is actually open for this absence test to be meaningful.
The old "pid changed" waiting loop was completely broken, as the old pid wasn't stripped (thus ending in `\n`), while the new one was. Thus the wait condition was immediately true. Nevertheless, it's not enough to wait for the system state to change, as the UI gets updated asynchronously. The restart events leaked into the following "Force stop" check, and caused unexpected UI changes. There is no steady state change visible in the UI after a restart. Expose the "Pid" and "StartedAt" properties as additional data properties, and use them in the test to wait until the UI actually caught up with the restart. Also, drop the unnecessary no-op filter change, the filter is already set to "All".
if (window.debugging === "all" || window.debugging?.includes("podman")) | ||
console.debug("podman", system ? "system" : "user", ...args); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These 2 added lines are not executed by any test. Details
|
||
import cockpit from 'cockpit'; | ||
import { useDialogs } from "dialogs.jsx"; | ||
|
||
import * as client from './client.js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wondering if eslint can group imports but eh, that's unrelated!
@@ -1229,6 +1229,7 @@ class TestApplication(testlib.MachineCase): | |||
if not auth: | |||
# Check that the checkpoint option is not present for rootless | |||
b.click(f"#containers-containers tbody tr:contains('{IMG_BUSYBOX}') .pf-v5-c-dropdown__toggle") | |||
b.wait_visible(self.getContainerAction(IMG_BUSYBOX, 'Force stop')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in commit message "hvae" => "have" but fine to merge.
Broken out from PR #1324, as these are ready for landing and already help with debugging. That former PR stress-tests testLifecycleOperationsUser. I still saw a different failure mode of testLifecycleOperationsUser, but the primary one should be fixed now.