Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
- Loading branch information
1 parent
86c4e2a
commit c7bb0ec
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