Skip to content

Commit e124234

Browse files
committed
[Issue #182] test coverage
1 parent 4a247e8 commit e124234

File tree

1 file changed

+21
-16
lines changed

1 file changed

+21
-16
lines changed

tests/remote.py

+21-16
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,27 @@ def test_remote_sanity(self):
2424
self.add_instance(backup_dir, 'node', node)
2525
node.slow_start()
2626

27-
try:
28-
self.backup_node(
29-
backup_dir, 'node',
30-
node, options=['--remote-proto=ssh', '--stream'], no_remote=True)
31-
# we should die here because exception is what we expect to happen
32-
self.assertEqual(
33-
1, 0,
34-
"Expecting Error because remote-host option is missing."
35-
"\n Output: {0} \n CMD: {1}".format(
36-
repr(self.output), self.cmd))
37-
except ProbackupException as e:
38-
self.assertIn(
39-
"Insert correct error",
40-
e.message,
41-
"\n Unexpected Error Message: {0}\n CMD: {1}".format(
42-
repr(e.message), self.cmd))
27+
output = self.backup_node(
28+
backup_dir, 'node', node,
29+
options=['--stream'], no_remote=True, return_id=False)
30+
self.assertIn('remote: false', output)
31+
32+
# try:
33+
# self.backup_node(
34+
# backup_dir, 'node',
35+
# node, options=['--remote-proto=ssh', '--stream'], no_remote=True)
36+
# # we should die here because exception is what we expect to happen
37+
# self.assertEqual(
38+
# 1, 0,
39+
# "Expecting Error because remote-host option is missing."
40+
# "\n Output: {0} \n CMD: {1}".format(
41+
# repr(self.output), self.cmd))
42+
# except ProbackupException as e:
43+
# self.assertIn(
44+
# "Insert correct error",
45+
# e.message,
46+
# "\n Unexpected Error Message: {0}\n CMD: {1}".format(
47+
# repr(e.message), self.cmd))
4348

4449
# Clean after yourself
4550
self.del_test_dir(module_name, fname)

0 commit comments

Comments
 (0)