Skip to content

Commit

Permalink
tests: add basic tests for cluset --completion (cea-hpc#563)
Browse files Browse the repository at this point in the history
Part of cea-hpc#563.
  • Loading branch information
thiell committed Jan 22, 2025
1 parent 7792827 commit debf512
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/CLINodesetTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,17 @@ def test_040_wildcards(self):
self._nodeset_t(["-s", "other", "--autostep=3", "-f", "*!*[033-099/2]"],
None, b"nova[030-032,034-100/2,101-489]\n")

def test_041_completion(self):
"""test nodeset --completion"""
self._nodeset_t(["--completion"], None,
b"@test:\n@other:\n@bar\n@foo\n@moo\n")
self._nodeset_t(["--completion", "node1", "node2"], None,
b"@test:\n@other:\n@bar\n@foo\n@moo\nnode1 node2\n")
self._nodeset_t(["-s", "other", "--completion"], None,
b"@other:baz\n@other:norf\n@other:qux\n")
self._nodeset_t(["-s", "other", "--completion", "node1", "node2"], None,
b"@other:baz\n@other:norf\n@other:qux\nnode1 node2\n")


class CLINodesetGroupResolverTest3(CLINodesetTestBase):
"""Unit test class for testing CLI/Nodeset.py with custom Group Resolver
Expand Down

0 comments on commit debf512

Please sign in to comment.