@@ -264,16 +264,26 @@ BROKEN:
264
264
[ " $status " -eq $ERROR_HEADER ]
265
265
}
266
266
267
- @test " header overall should allow fixup if env set " {
268
- COMMIT_VALIDATOR_ALLOW_TEMP= validate_header " fixup! plopezrr"
267
+ @test " header overall should allow fixup if env not empty " {
268
+ COMMIT_VALIDATOR_ALLOW_TEMP=1 validate_header " fixup! plopezrr"
269
269
[[ $GLOBAL_TYPE == " temp" ]]
270
270
}
271
271
272
- @test " header overall should allow squash if env set " {
273
- COMMIT_VALIDATOR_ALLOW_TEMP= validate_header " squash! plopezrr"
272
+ @test " header overall should allow squash if env not empty " {
273
+ COMMIT_VALIDATOR_ALLOW_TEMP=1 validate_header " squash! plopezrr"
274
274
[[ $GLOBAL_TYPE == " temp" ]]
275
275
}
276
276
277
+ @test " header overall should reject fixup if env empty" {
278
+ COMMIT_VALIDATOR_ALLOW_TEMP= run validate_header " fixup! plopezrr"
279
+ [[ " $status " -eq $ERROR_HEADER ]]
280
+ }
281
+
282
+ @test " header overall should reject squash if env empty" {
283
+ COMMIT_VALIDATOR_ALLOW_TEMP= run validate_header " squash! plopezrr"
284
+ [[ " $status " -eq $ERROR_HEADER ]]
285
+ }
286
+
277
287
@test " header overall should reject fixup if env not set" {
278
288
run validate_header " fixup! plopezrr"
279
289
[[ " $status " -eq $ERROR_HEADER ]]
@@ -480,9 +490,14 @@ LUM-2345'
480
490
[[ ` need_jira " fix" ` -eq 1 ]]
481
491
}
482
492
483
- @test " features and fixes commits don't need jira reference if set" {
484
- [[ ` COMMIT_VALIDATOR_NO_JIRA= need_jira " feat" ` -eq 0 ]]
485
- [[ ` COMMIT_VALIDATOR_NO_JIRA= need_jira " fix" ` -eq 0 ]]
493
+ @test " features and fixes commits need jira reference if env empty" {
494
+ [[ ` COMMIT_VALIDATOR_NO_JIRA= need_jira " feat" ` -eq 1 ]]
495
+ [[ ` COMMIT_VALIDATOR_NO_JIRA= need_jira " fix" ` -eq 1 ]]
496
+ }
497
+
498
+ @test " features and fixes commits don't need jira reference if env non empty" {
499
+ [[ ` COMMIT_VALIDATOR_NO_JIRA=1 need_jira " feat" ` -eq 0 ]]
500
+ [[ ` COMMIT_VALIDATOR_NO_JIRA=1 need_jira " fix" ` -eq 0 ]]
486
501
}
487
502
488
503
@test " other commits don't need jira reference" {
@@ -665,7 +680,7 @@ BROKEN:
665
680
- plop
666
681
- plop'
667
682
668
- COMMIT_VALIDATOR_ALLOW_TEMP= run validate " $MESSAGE "
683
+ COMMIT_VALIDATOR_ALLOW_TEMP=1 run validate " $MESSAGE "
669
684
[[ " $status " -eq 0 ]]
670
685
}
671
686
0 commit comments