@@ -3684,9 +3684,9 @@ def test_start_time_few_nodes_incorrect_time(self):
3684
3684
"\n Output: {0} \n CMD: {1}" .format (
3685
3685
repr (self .output ), self .cmd ))
3686
3686
except ProbackupException as e :
3687
- self .assertRegex (
3687
+ self .assertIn (
3688
+ "ERROR: Can't assign backup_id from requested start_time (7PS), this time must be later that backup" ,
3688
3689
e .message ,
3689
- "ERROR: Cannot create directory for older backup" ,
3690
3690
"\n Unexpected Error Message: {0}\n CMD: {1}" .format (
3691
3691
repr (e .message ), self .cmd ))
3692
3692
@@ -3710,9 +3710,9 @@ def test_start_time_few_nodes_incorrect_time(self):
3710
3710
"\n Output: {0} \n CMD: {1}" .format (
3711
3711
repr (self .output ), self .cmd ))
3712
3712
except ProbackupException as e :
3713
- self .assertRegex (
3713
+ self .assertIn (
3714
+ "ERROR: Can't assign backup_id from requested start_time (7PS), this time must be later that backup" ,
3714
3715
e .message ,
3715
- "ERROR: Cannot create directory for older backup" ,
3716
3716
"\n Unexpected Error Message: {0}\n CMD: {1}" .format (
3717
3717
repr (e .message ), self .cmd ))
3718
3718
@@ -3722,15 +3722,14 @@ def test_start_time_few_nodes_incorrect_time(self):
3722
3722
3723
3723
# PTRACK backup
3724
3724
startTime = int (time ())
3725
- if self .ptrack and node1 . major_version > 11 :
3725
+ if self .ptrack :
3726
3726
node1 .safe_psql (
3727
3727
"postgres" ,
3728
3728
"create extension ptrack" )
3729
3729
self .backup_node (
3730
3730
backup_dir1 , 'node1' , node1 , backup_type = "ptrack" ,
3731
3731
options = ['--stream' , '--start-time' , str (startTime )])
3732
3732
3733
- if self .ptrack and node2 .major_version > 11 :
3734
3733
node2 .safe_psql (
3735
3734
"postgres" ,
3736
3735
"create extension ptrack" )
@@ -3745,9 +3744,9 @@ def test_start_time_few_nodes_incorrect_time(self):
3745
3744
"\n Output: {0} \n CMD: {1}" .format (
3746
3745
repr (self .output ), self .cmd ))
3747
3746
except ProbackupException as e :
3748
- self .assertRegex (
3747
+ self .assertIn (
3748
+ "ERROR: Can't assign backup_id from requested start_time (7PS), this time must be later that backup" ,
3749
3749
e .message ,
3750
- "ERROR: Cannot create directory for older backup" ,
3751
3750
"\n Unexpected Error Message: {0}\n CMD: {1}" .format (
3752
3751
repr (e .message ), self .cmd ))
3753
3752
@@ -3760,7 +3759,8 @@ def test_start_time_few_nodes_incorrect_time(self):
3760
3759
backup_dir2 , 'node2' , node2 , backup_type = "full" ,
3761
3760
options = ['--stream' , '--start-time' , str (startTime )])
3762
3761
3763
- show_backup1 = self .show_pb (backup_dir1 , 'node1' )[4 ]
3762
+ show_backups_node1 = self .show_pb (backup_dir1 , 'node1' )
3763
+ show_backup1 = show_backups_node1 [len (show_backups_node1 ) - 1 ]
3764
3764
show_backup2 = self .show_pb (backup_dir2 , 'node2' )[1 ]
3765
3765
self .assertEqual (show_backup1 ['id' ], show_backup2 ['id' ])
3766
3766
0 commit comments