@@ -21,7 +21,9 @@ def test_success(self):
2121 ['backups' , 'wal' ]
2222 )
2323 self .add_instance (backup_dir , 'node' , node )
24- self .assertEqual ("INFO: Instance 'node' successfully deleted\n " , self .del_instance (backup_dir , 'node' ),
24+ self .assertIn (
25+ "INFO: Instance 'node' successfully deleted" ,
26+ self .del_instance (backup_dir , 'node' ),
2527 '\n Unexpected Error Message: {0}\n CMD: {1}' .format (repr (self .output ), self .cmd ))
2628
2729 # Show non-existing instance
@@ -30,8 +32,9 @@ def test_success(self):
3032 self .assertEqual (1 , 0 , 'Expecting Error due to show of non-existing instance. Output: {0} \n CMD: {1}' .format (
3133 repr (self .output ), self .cmd ))
3234 except ProbackupException as e :
33- self .assertEqual (e .message ,
34- "ERROR: Instance 'node' does not exist in this backup catalog\n " ,
35+ self .assertIn (
36+ "ERROR: Instance 'node' does not exist in this backup catalog" ,
37+ e .message ,
3538 '\n Unexpected Error Message: {0}\n CMD: {1}' .format (e .message , self .cmd ))
3639
3740 # Delete non-existing instance
@@ -40,8 +43,9 @@ def test_success(self):
4043 self .assertEqual (1 , 0 , 'Expecting Error due to delete of non-existing instance. Output: {0} \n CMD: {1}' .format (
4144 repr (self .output ), self .cmd ))
4245 except ProbackupException as e :
43- self .assertEqual (e .message ,
44- "ERROR: Instance 'node1' does not exist in this backup catalog\n " ,
46+ self .assertIn (
47+ "ERROR: Instance 'node1' does not exist in this backup catalog" ,
48+ e .message ,
4549 '\n Unexpected Error Message: {0}\n CMD: {1}' .format (e .message , self .cmd ))
4650
4751 # Add instance without pgdata
@@ -54,8 +58,9 @@ def test_success(self):
5458 self .assertEqual (1 , 0 , 'Expecting Error due to adding instance without pgdata. Output: {0} \n CMD: {1}' .format (
5559 repr (self .output ), self .cmd ))
5660 except ProbackupException as e :
57- self .assertEqual (e .message ,
58- "ERROR: Required parameter not specified: PGDATA (-D, --pgdata)\n " ,
61+ self .assertIn (
62+ "ERROR: Required parameter not specified: PGDATA (-D, --pgdata)" ,
63+ e .message ,
5964 '\n Unexpected Error Message: {0}\n CMD: {1}' .format (e .message , self .cmd ))
6065
6166 # Clean after yourself
@@ -73,8 +78,9 @@ def test_already_exist(self):
7378 self .assertEqual (1 , 0 , 'Expecting Error due to initialization in non-empty directory. Output: {0} \n CMD: {1}' .format (
7479 repr (self .output ), self .cmd ))
7580 except ProbackupException as e :
76- self .assertEqual (e .message ,
77- "ERROR: Instance 'node' does not exist in this backup catalog\n " ,
81+ self .assertIn (
82+ "ERROR: Instance 'node' does not exist in this backup catalog" ,
83+ e .message ,
7884 '\n Unexpected Error Message: {0}\n CMD: {1}' .format (repr (e .message ), self .cmd ))
7985
8086 # Clean after yourself
@@ -91,8 +97,9 @@ def test_abs_path(self):
9197 self .assertEqual (1 , 0 , 'Expecting Error due to initialization with non-absolute path in --backup-path. Output: {0} \n CMD: {1}' .format (
9298 repr (self .output ), self .cmd ))
9399 except ProbackupException as e :
94- self .assertEqual (e .message ,
95- "ERROR: -B, --backup-path must be an absolute path\n " ,
100+ self .assertIn (
101+ "ERROR: -B, --backup-path must be an absolute path" ,
102+ e .message ,
96103 '\n Unexpected Error Message: {0}\n CMD: {1}' .format (repr (e .message ), self .cmd ))
97104
98105 # Clean after yourself
0 commit comments