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

Debug flakes #1324

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,6 @@ srpm_build_deps:
- npm

jobs:
- job: copr_build
trigger: pull_request
targets:
- fedora-37
- fedora-38
- fedora-latest-aarch64
- fedora-development
- centos-stream-9-x86_64
- centos-stream-9-aarch64
- centos-stream-8-x86_64

- job: tests
trigger: pull_request
targets:
- fedora-37
- fedora-38
- fedora-latest-aarch64
- fedora-development
- centos-stream-9-x86_64
- centos-stream-9-aarch64
- centos-stream-8-x86_64

- job: copr_build
trigger: release
owner: "@cockpit"
Expand Down
69 changes: 69 additions & 0 deletions test/check-application
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,12 @@ class TestApplication(testlib.MachineCase):
b.click(".pf-v5-c-modal-box button:contains('Force delete')")
self.waitPodRow("pod-1", False)

# HACK: there is some race here which steals the focus from the filter input and selects the page text instead
for _ in range(3):
b.focus('#containers-filter')
time.sleep(1)
if b.eval_js('document.activeElement == document.querySelector("#containers-filter")'):
break
b.set_input_text('#containers-filter', '')
self.machine.execute("podman pod create --infra=false --name pod-2")
self.waitPodContainer("pod-2", [])
Expand Down Expand Up @@ -401,6 +407,18 @@ class TestApplication(testlib.MachineCase):
b.click("#table-pod-3-title .pod-details-volumes-btn")
b.wait_in_text(".pf-v5-c-popover__content", "/tmp ↔ /app")

def testPods2(self):
self.testPods()

def testPods3(self):
self.testPods()

def testPods4(self):
self.testPods()

def testPods5(self):
self.testPods()

def testBasicSystem(self):
self._testBasic(True)

Expand Down Expand Up @@ -559,6 +577,8 @@ class TestApplication(testlib.MachineCase):
expected_ws += "ws"

self.login(auth)
b.eval_js('window.debugging = "podman"')
b.cdp.trace = True

# Check all containers
if auth:
Expand Down Expand Up @@ -1510,6 +1530,15 @@ class TestApplication(testlib.MachineCase):
def testCreateContainerSystem(self):
self._testCreateContainer(True)

def testCreateContainerSystem2(self):
self._testCreateContainer(True)

def testCreateContainerSystem3(self):
self._testCreateContainer(True)

def testCreateContainerSystem4(self):
self._testCreateContainer(True)

def testCreateContainerUser(self):
self._testCreateContainer(False)

Expand Down Expand Up @@ -1537,6 +1566,9 @@ class TestApplication(testlib.MachineCase):
b = self.browser
container_name = "busybox-downloaded"

b.eval_js('window.debugging = "podman"')
b.cdp.trace = True

b.click("#containers-containers button.pf-v5-c-button.pf-m-primary")
b.set_input_text("#run-image-dialog-name", container_name)

Expand Down Expand Up @@ -1634,6 +1666,8 @@ class TestApplication(testlib.MachineCase):
self.execute(False, "podman rmi --all")

self.login(auth)
b.eval_js('window.debugging = "podman"')
b.cdp.trace = True

b.click("#containers-images button.pf-v5-c-expandable-section__toggle")

Expand Down Expand Up @@ -2278,6 +2312,8 @@ class TestApplication(testlib.MachineCase):
self.execute(False, f"podman rmi {IMG_BUSYBOX}")

self.login(auth)
b.eval_js('window.debugging = "podman"')
b.cdp.trace = True

b.click("#containers-images button.pf-v5-c-expandable-section__toggle")

Expand Down Expand Up @@ -2399,9 +2435,27 @@ class TestApplication(testlib.MachineCase):
def testHealthcheckSystem(self):
self._testHealthcheck(True)

def testHealthcheckSystem2(self):
self._testHealthcheck(True)

def testHealthcheckSystem3(self):
self._testHealthcheck(True)

def testHealthcheckSystem4(self):
self._testHealthcheck(True)

def testHealthcheckUser(self):
self._testHealthcheck(False)

def testHealthcheckUser2(self):
self._testHealthcheck(False)

def testHealthcheckUser3(self):
self._testHealthcheck(False)

def testHealthcheckUser4(self):
self._testHealthcheck(False)

# Ubuntu 2204 lacks user systemd units
# https://github.com/containers/podman/commit/9312d458b4254b48e331d1ae40cb2f6d0fec9bd0
@testlib.skipImage("podman-restart not available for user", "ubuntu-2204")
Expand Down Expand Up @@ -2578,6 +2632,18 @@ class TestApplication(testlib.MachineCase):
def testCreatePodUser(self):
self._createPod(False)

def testCreatePodUser2(self):
self._createPod(False)

def testCreatePodUser3(self):
self._createPod(False)

def testCreatePodUser4(self):
self._createPod(False)

def testCreatePodUser5(self):
self._createPod(False)

def _createPod(self, auth):
b = self.browser
m = self.machine
Expand Down Expand Up @@ -2625,6 +2691,9 @@ class TestApplication(testlib.MachineCase):
b.set_file_autocomplete_val("#create-pod-dialog-volume-1 .pf-v5-c-select", rwdir)
b.set_input_text('#create-pod-dialog-volume-1-container-path', '/tmp/rw')

b.eval_js('window.debugging = "podman"')
b.cdp.trace = True

b.click("#create-pod-create-btn")
b.set_val("#containers-containers-filter", "all")
self.waitPodContainer(pod_name, [])
Expand Down