Skip to content

Add integration tests for invalid schedule validation#11556

Merged
pelikhan merged 2 commits into
mainfrom
copilot/add-compiler-integration-test
Jan 23, 2026
Merged

Add integration tests for invalid schedule validation#11556
pelikhan merged 2 commits into
mainfrom
copilot/add-compiler-integration-test

Conversation

Copilot AI commented Jan 23, 2026

Copy link
Copy Markdown
Contributor

The compiler validates schedule syntax during workflow compilation, but lacked integration tests verifying that invalid schedules properly fail compilation.

Changes

Added two integration tests in pkg/cli/compile_integration_test.go:

  • TestCompileWithInvalidSchedule - Verifies invalid schedule strings in simple format fail compilation
  • TestCompileWithInvalidScheduleArrayFormat - Verifies invalid schedules in array/cron format fail compilation

Both tests validate:

  • Compilation exits with error
  • Error output mentions schedule/cron/trigger
  • No lock file is generated on validation failure

Example invalid schedule formats tested:

# Simple format
on:
  schedule: invalid schedule format

# Array format  
on:
  schedule:
    - cron: totally invalid cron here
Original prompt

Add compiler integration test to ensure that an invalid schedule string (on: ...) fails the workflow compilation.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

- Add TestCompileWithInvalidSchedule: tests that invalid schedule strings fail compilation
- Add TestCompileWithInvalidScheduleArrayFormat: tests invalid schedules in array format
- Both tests verify compilation fails with appropriate error messages
- Both tests verify no lock file is created on failure

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add compiler integration test for invalid schedule string Add integration tests for invalid schedule validation Jan 23, 2026
Copilot AI requested a review from pelikhan January 23, 2026 20:23
@pelikhan pelikhan marked this pull request as ready for review January 23, 2026 22:10
@pelikhan pelikhan merged commit fa7a30a into main Jan 23, 2026
137 checks passed
@pelikhan pelikhan deleted the copilot/add-compiler-integration-test branch January 23, 2026 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants