Skip to content

Commit 59bc618

Browse files
test: improve test coverage
1 parent 9437525 commit 59bc618

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

provider/helpers/schedule_validation_test.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,24 @@ func TestSchedulesOverlap(t *testing.T) {
477477
s2: "* 9-18 * * 1-5",
478478
expectErr: true,
479479
},
480+
{
481+
name: "Invalid field count - too few fields",
482+
s1: "* 9-18 * *",
483+
s2: "* 9-18 * * 1-5",
484+
expectErr: true,
485+
},
486+
{
487+
name: "Invalid field count - too many fields",
488+
s1: "* 9-18 * * 1-5 *",
489+
s2: "* 9-18 * * 1-5",
490+
expectErr: true,
491+
},
492+
{
493+
name: "Invalid field count - s2 has too few fields",
494+
s1: "* 9-18 * * 1-5",
495+
s2: "* 9-18 * *",
496+
expectErr: true,
497+
},
480498
}
481499

482500
for _, testCase := range testCases {

0 commit comments

Comments
 (0)