Skip to content

Commit

Permalink
tests/main: Add test for valid ssh_config
Browse files Browse the repository at this point in the history
Signed-off-by: Zack Cerza <[email protected]>
  • Loading branch information
zmc committed Jan 31, 2020
1 parent 8bd9c53 commit b39ea78
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ceph_medic/tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,11 @@ def test_invalid_ssh_config(self, capsys):
ceph_medic.main.Medic(argv)
out = capsys.readouterr()
assert 'the given ssh config path does not exist' in out.out

def test_valid_ssh_config(self, capsys):
ssh_config = '/etc/ssh/ssh_config'
argv = ["ceph-medic", "--ssh-config", ssh_config]
ceph_medic.main.Medic(argv)
out = capsys.readouterr()
assert out.out == ''
assert ssh_config == ceph_medic.main.ceph_medic.config.ssh_config

0 comments on commit b39ea78

Please sign in to comment.