test(workflow): add tests for nil node edge cases in extractJobOrderFromNode#75
Merged
Merged
Conversation
…romNode Add comprehensive tests for nil node handling in YAML parsing: - nil key node in doc.Content - nil value node in doc.Content - nil job key node in jobs.Content - nil doc node This achieves 100% coverage for load.go.
Add test case for the defensive programming branch in shouldSkipJob where a dependency job was not executed. This covers the edge case that normally shouldn't occur with proper topological sort. Achieves 100% coverage for shouldSkipJob function.
Add comprehensive tests for StepExecutor.Execute error handling: - Strict mode: returns error when condition evaluation fails - Permissive mode: logs warning and continues execution This achieves 100% coverage for the Execute function.
Add tests for ValidatePathWithSymlinkResolution edge cases: - os.Lstat permission error (skipped when run as root) - Broken symlink detection via EvalSymlinks error - EvalSymlinks error on basePath Improves security package coverage from 87.0% to 89.1%.
Add test case for UnmarshalYAML Decode error when needs field contains invalid YAML mapping instead of string or string slice. Improves workflow package coverage from 93.0% to 94.2%.
Add tests for edge cases in evaluator functions: - Unknown node type in evaluateNode - Unknown unary operator in evaluateUnary - Unknown binary operator in evaluateBinary - nil Env in resolveIdentifier Improves expression package coverage from 97.3% to 98.4%.
Add test case that creates a detached HEAD state by checking out a commit SHA directly, verifying GitHeadRef returns empty string. This achieves 100% coverage for util package.
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.
Add comprehensive tests for nil node handling in YAML parsing:
This achieves 100% coverage for load.go.