Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3b9d6c4

Browse files
committed
tests: added remote.RemoteTest.test_remote_sanity
1 parent2fd3457 commit3b9d6c4

File tree

1 file changed

+17
-19
lines changed

1 file changed

+17
-19
lines changed

‎tests/remote.py

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class RemoteTest(ProbackupTest, unittest.TestCase):
1212

1313
# @unittest.skip("skip")
1414
# @unittest.expectedFailure
15-
deftest_remote_1(self):
15+
deftest_remote_sanity(self):
1616
fname=self.id().split('.')[3]
1717
node=self.make_simple_node(
1818
base_dir=os.path.join(module_name,fname,'node'),
@@ -21,26 +21,24 @@ def test_remote_1(self):
2121
backup_dir=os.path.join(self.tmp_path,module_name,fname,'backup')
2222
self.init_pb(backup_dir)
2323
self.add_instance(backup_dir,'node',node)
24-
# self.set_archiving(backup_dir, 'node', node, remote=True)
2524
node.slow_start()
2625

27-
self.backup_node(
28-
backup_dir,'node',node,
29-
options=['--remote-proto=ssh','--remote-host=localhost','--stream'])
30-
31-
pgdata=self.pgdata_content(node.data_dir)
32-
33-
node.cleanup()
34-
35-
self.restore_node(
36-
backup_dir,'node',node,
37-
options=[
38-
'--remote-proto=ssh',
39-
'--remote-host=localhost'])
40-
41-
# Physical comparison
42-
pgdata_restored=self.pgdata_content(node.data_dir)
43-
self.compare_pgdata(pgdata,pgdata_restored)
26+
try:
27+
self.backup_node(
28+
backup_dir,'node',
29+
node,options=['--remote-proto=ssh','--stream'])
30+
# we should die here because exception is what we expect to happen
31+
self.assertEqual(
32+
1,0,
33+
"Expecting Error because remote-host option is missing."
34+
"\n Output: {0}\n CMD: {1}".format(
35+
repr(self.output),self.cmd))
36+
exceptProbackupExceptionase:
37+
self.assertIn(
38+
"Insert correct error",
39+
e.message,
40+
"\n Unexpected Error Message: {0}\n CMD: {1}".format(
41+
repr(e.message),self.cmd))
4442

4543
# Clean after yourself
4644
self.del_test_dir(module_name,fname)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp