Skip to content

Commit

Permalink
debug CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jelly committed Jun 24, 2024
1 parent b68c2f3 commit 44300a3
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions test/check-application
Original file line number Diff line number Diff line change
Expand Up @@ -1219,7 +1219,6 @@ class TestApplication(testlib.MachineCase):

# build update and push it
buildImage(True, "hello world", image1)
image1_update_sha = self.execute(True, f"podman inspect --format '{{{{.Id}}}}' {image1}").strip()
self.execute(True, f"podman push {image1}; podman rmi {image1}")

# build image which we try to pull
Expand All @@ -1237,6 +1236,12 @@ class TestApplication(testlib.MachineCase):
b.wait_in_text("div.download-in-progress", "Pulling")
b.wait_not_present(image1_sel)

self.execute(True, f"""
until [ $(podman inspect --format {{{{.Id}}}} {image1}) != "{image1_sha}" ]; do sleep 1; done
""")

image1_update_sha = self.execute(True, f"podman inspect --format '{{{{.Id}}}}' {image1}").strip()
self.assertNotEqual(image1_sha, image1_update_sha)
b.wait_visible(f"#containers-images tbody tr[data-row-id=\"{image1_update_sha}true\"]".lower())

# Try to pull multiple images, drop to superuser as its easier to
Expand All @@ -1248,7 +1253,7 @@ class TestApplication(testlib.MachineCase):

# build update and push it
buildImage(False, "hello world", image1)
image1_update_sha = self.execute(False, f"podman inspect --format '{{{{.Id}}}}' {image1}").strip()
image1_sha = self.execute(False, f"podman inspect --format '{{{{.Id}}}}' {image1}").strip()
self.execute(False, f"podman push {image1}; podman rmi {image1}")

# build image which we try to pull
Expand All @@ -1258,7 +1263,7 @@ class TestApplication(testlib.MachineCase):

# build update and push it
buildImage(False, "open sesami", image2)
image2_update_sha = self.execute(False, f"podman inspect --format '{{{{.Id}}}}' {image2}").strip()
image2_sha = self.execute(False, f"podman inspect --format '{{{{.Id}}}}' {image2}").strip()
self.execute(False, f"podman push {image2}; podman rmi {image2}")

# build image which we try to pull
Expand All @@ -1283,6 +1288,15 @@ class TestApplication(testlib.MachineCase):
b.wait_not_present('h4.pf-v5-c-alert__title:contains("Failed to download image")')
b.wait_not_present("div.download-in-progress")

image1_sel = f"#containers-images tbody tr[data-row-id=\"{image1_sha}false\"]".lower()
image2_sel = f"#containers-images tbody tr[data-row-id=\"{image2_sha}false\"]".lower()
b.wait_not_present(image1_sel)
b.wait_not_present(image2_sel)

image1_update_sha = self.execute(False, f"podman inspect --format '{{{{.Id}}}}' {image1}").strip()
self.assertNotEqual(image1_sha, image1_update_sha)
image2_update_sha = self.execute(False, f"podman inspect --format '{{{{.Id}}}}' {image2}").strip()
self.assertNotEqual(image2_sha, image2_update_sha)
b.wait_visible(f"#containers-images tbody tr[data-row-id=\"{image1_update_sha}false\"]".lower())
b.wait_visible(f"#containers-images tbody tr[data-row-id=\"{image2_update_sha}false\"]".lower())

Expand Down

0 comments on commit 44300a3

Please sign in to comment.