Skip to content

cli: add pytest tests for pipelines validate and load#7

Open
varshhhy7 wants to merge 5 commits into
open-gitagent:mainfrom
varshhhy7:cli/tests
Open

cli: add pytest tests for pipelines validate and load#7
varshhhy7 wants to merge 5 commits into
open-gitagent:mainfrom
varshhhy7:cli/tests

Conversation

@varshhhy7
Copy link
Copy Markdown

Adds pytest tests for the new pipelines validate command and
the file loader. Sets up test infrastructure (dev dep, tests/ dir).

Run with:
PYTHONPATH=./langship-cli/src pytest langship-cli/tests -v

26 passed in 0.10s

Fixes #6

varshhhy7 added 5 commits June 4, 2026 09:07
Local-only validation that checks pipeline definitions before hitting the
server. Validates:
- valid JSON/YAML parsing
- nodes is a non-empty array
- each node has id, name, type (non-empty strings)
- no duplicate node names or ids
- exactly one trigger node (sync'd with pkg/engine/parser.go types)
- connections reference valid node names
- position is an array of 2 numbers
26 tests covering:
- happy path: valid pipeline, definition wrapper, no connections
- trigger rules: known trigger types, no trigger, multiple triggers
- node shape: missing/duplicate id, missing/duplicate name, missing
  type, bad position
- connections: unknown target, unknown source, wrong shape, missing
  node field
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.

cli: add pytest tests for pipeline validation

1 participant