cli: add pytest tests for pipelines validate and load#7
Open
varshhhy7 wants to merge 5 commits into
Open
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds pytest tests for the new
pipelines validatecommand andthe 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