@@ -3659,7 +3659,7 @@ def test_partial_validate_empty_and_mangled_database_map(self):
36593659 try :
36603660 self .validate_pb (
36613661 backup_dir , 'node' ,
3662- options = ["--db-include=db1" , '--no-validate' ])
3662+ options = ["--db-include=db1" ])
36633663 self .assertEqual (
36643664 1 , 0 ,
36653665 "Expecting Error because database_map is empty.\n "
@@ -3680,7 +3680,7 @@ def test_partial_validate_empty_and_mangled_database_map(self):
36803680 try :
36813681 self .validate_pb (
36823682 backup_dir , 'node' ,
3683- options = ["--db-include=db1" , '--no-validate' ])
3683+ options = ["--db-include=db1" ])
36843684 self .assertEqual (
36853685 1 , 0 ,
36863686 "Expecting Error because database_map is empty.\n "
@@ -3735,8 +3735,27 @@ def test_partial_validate_exclude(self):
37353735 '\n Unexpected Error Message: {0}\n CMD: {1}' .format (
37363736 repr (e .message ), self .cmd ))
37373737
3738+ try :
3739+ self .validate_pb (
3740+ backup_dir , 'node' ,
3741+ options = [
3742+ "--db-exclude=db1" ,
3743+ "--db-exclude=db5" ,
3744+ "--log-level-console=verbose" ])
3745+ self .assertEqual (
3746+ 1 , 0 ,
3747+ "Expecting Error because of missing backup ID.\n "
3748+ "Output: {0} \n CMD: {1}" .format (
3749+ self .output , self .cmd ))
3750+ except ProbackupException as e :
3751+ self .assertIn (
3752+ "ERROR: You must specify parameter (-i, --backup-id) for partial validation" ,
3753+ e .message ,
3754+ '\n Unexpected Error Message: {0}\n CMD: {1}' .format (
3755+ repr (e .message ), self .cmd ))
3756+
37383757 output = self .validate_pb (
3739- backup_dir , 'node' ,
3758+ backup_dir , 'node' , backup_id ,
37403759 options = [
37413760 "--db-exclude=db1" ,
37423761 "--db-exclude=db5" ,
@@ -3789,7 +3808,7 @@ def test_partial_validate_include(self):
37893808 repr (e .message ), self .cmd ))
37903809
37913810 output = self .validate_pb (
3792- backup_dir , 'node' ,
3811+ backup_dir , 'node' , backup_id ,
37933812 options = [
37943813 "--db-include=db1" ,
37953814 "--db-include=db5" ,
@@ -3800,9 +3819,8 @@ def test_partial_validate_include(self):
38003819 "VERBOSE: Skip file validation due to partial restore" , output )
38013820
38023821 output = self .validate_pb (
3803- backup_dir , 'node' ,
3804- options = [
3805- "--log-level-console=verbose" ])
3822+ backup_dir , 'node' , backup_id ,
3823+ options = ["--log-level-console=verbose" ])
38063824
38073825 self .assertNotIn (
38083826 "VERBOSE: Skip file validation due to partial restore" , output )
0 commit comments