Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31523 from sebastian-philipp/ssh-make-check
mgr/ssh: add make check integration Reviewed-by: Thomas Bechtold <tbechtold@suse.com>
- Loading branch information
Showing
4 changed files
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
from .module import SSHOrchestrator | ||
import os | ||
|
||
if 'UNITTEST' in os.environ: | ||
import tests | ||
|
||
from .module import SSHOrchestrator |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from orchestrator import ServiceDescription | ||
from ..module import SSHOrchestrator | ||
from tests import mock | ||
|
||
|
||
@mock.patch("ssh.module.SSHOrchestrator.get_ceph_option", lambda _,key: __file__) | ||
def test_get_unique_name(): | ||
o = SSHOrchestrator('module_name', 0, 0) | ||
existing = [ | ||
ServiceDescription(service_instance='mon.a') | ||
] | ||
new_mon = o.get_unique_name(existing, 'mon') | ||
assert new_mon.startswith('mon.') | ||
assert new_mon != 'mon.a' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters