Skip to content

Commit

Permalink
Add test for pifpaf list command
Browse files Browse the repository at this point in the history
This adds a test that the pifpaf list
command exites successfully and contains
atleast one driver name.
  • Loading branch information
tobias-urdin committed Oct 11, 2024
1 parent 2b9face commit a5447f4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pifpaf/tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,14 @@ def test_global_urls_variable_old_format(self):
b"\"memcached://localhost:11217;memcached://localhost:11218\";",
env[b"export PIFPAF_URLS"])

def test_list_command(self):
c = subprocess.Popen(["pifpaf", "list"],
bufsize=0,
stdout=subprocess.PIPE)
(stdout, stderr) = c.communicate()
self.assertEqual(0, c.wait())
self.assertIn("ceph", stdout)

def test_non_existing_command(self):
# Keep PATH to just the one set by tox to run pifpaf
self.useFixture(fixtures.EnvironmentVariable(
Expand Down

0 comments on commit a5447f4

Please sign in to comment.