Skip to content

Commit

Permalink
Add manifest conditions
Browse files Browse the repository at this point in the history
Check for the existence of the podman.socket for the Cockpit client
scenario.
  • Loading branch information
jelly committed Jun 15, 2023
1 parent ac46469 commit d231d66
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"conditions": [
{"path-exists": "/lib/systemd/system/podman.socket"}
],
"menu": {
"index": {
"label": "Podman containers",
Expand Down
15 changes: 15 additions & 0 deletions test/check-application
Original file line number Diff line number Diff line change
Expand Up @@ -2563,6 +2563,21 @@ class TestApplication(testlib.MachineCase):
b.click(".pf-m-expanded button:contains('Logs')")
b.wait_in_text(".pf-m-expanded .pf-c-empty-state__content", "failed to obtain logs for Container")

@testlib.skipOstree("/lib is read-only")
def testManifest(self):
b = self.browser
m = self.machine
self.restore_file("/lib/systemd/system/podman.socket", post_restore_action="systemctl daemon-reload")
m.execute("rm /lib/systemd/system/podman.socket")
self.login_and_go(None)
b.wait_in_text("#host-apps .pf-m-current", "Overview")

# HACK: is_pybridge should also check TEST_SCENARIO
if self.is_pybridge or os.getenv('TEST_SCENARIO', '') == 'pybridge':
self.assertNotIn("Podman", b.text("#host-apps"))
else:
self.assertIn("Podman", b.text("#host-apps"))


if __name__ == '__main__':
testlib.test_main()

0 comments on commit d231d66

Please sign in to comment.