@@ -622,8 +622,8 @@ func TestCreateScanWithPrimaryBranchFlagBooleanValueFalse_Passed(t *testing.T) {
622
622
func TestCreateScanWithPrimaryBranchFlagStringValue_Should_Fail (t * testing.T ) {
623
623
err := execCmdNotNilAssertion (t , "scan" , "create" , "--project-name" , "MOCK" , "-s" , dummyRepo , "-b" , "dummy_branch" , "--debug" , "--branch-primary=string" )
624
624
assert .ErrorContains (t , err , "invalid argument \" string\" " , err .Error ())
625
-
626
625
}
626
+
627
627
func Test_parseThresholdSuccess (t * testing.T ) {
628
628
want := make (map [string ]int )
629
629
want ["iac-security-low" ] = 1
@@ -642,15 +642,13 @@ func Test_parseThresholdsSuccess(t *testing.T) {
642
642
t .Errorf ("parseThreshold() = %v, want %v" , got , want )
643
643
}
644
644
}
645
-
646
645
func Test_parseThresholdParseError (t * testing.T ) {
647
646
want := make (map [string ]int )
648
647
threshold := " KICS - LoW=error"
649
648
if got := parseThreshold (threshold ); ! reflect .DeepEqual (got , want ) {
650
649
t .Errorf ("parseThreshold() = %v, want %v" , got , want )
651
650
}
652
651
}
653
-
654
652
func TestCreateScanProjectTags (t * testing.T ) {
655
653
execCmdNilAssertion (t , scanCommand , "create" , "--project-name" , "MOCK" , "-s" , dummyRepo , "-b" , "dummy_branch" ,
656
654
"--project-tags" , "test" , "--debug" )
0 commit comments