Skip to content

Commit 37bb464

Browse files
committed
debug: add detailed debugging to circular dependency test
- Add comprehensive debug output to test 53 for CI troubleshooting - Shows services config content, available services, and dependencies - Displays function exit code and output for analysis - Helps identify environment-specific differences between local and CI This will provide insight into why the test passes locally but may fail in CI.
1 parent f07bc4d commit 37bb464

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

tests/unit/scripts/dependency_resolver_test.bats

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,38 @@ teardown() {
160160

161161
@test "detect_circular_dependencies_should_find_circular_refs" {
162162
# Test circular dependency detection
163+
164+
# Debug: Show the services.yaml content for debugging
165+
SERVICES_CONFIG_PATH="$PROJECT_ROOT/config/services.yaml"
166+
echo "DEBUG: Using SERVICES_CONFIG path: $SERVICES_CONFIG_PATH"
167+
echo "DEBUG: PROJECT_ROOT: $PROJECT_ROOT"
168+
echo "DEBUG: Services config content:"
169+
cat "$SERVICES_CONFIG_PATH"
170+
echo ""
171+
172+
# Debug: Show available services
173+
echo "DEBUG: Available services:"
174+
yq '.services | keys' "$SERVICES_CONFIG_PATH"
175+
echo ""
176+
177+
# Debug: Show circular-a dependencies
178+
echo "DEBUG: circular-a dependencies:"
179+
yq '.services."circular-a".depends_on // []' "$SERVICES_CONFIG_PATH"
180+
echo ""
181+
182+
# Debug: Show circular-b dependencies
183+
echo "DEBUG: circular-b dependencies:"
184+
yq '.services."circular-b".depends_on // []' "$SERVICES_CONFIG_PATH"
185+
echo ""
186+
163187
run detect_circular_dependencies
188+
189+
# Debug: Show function output and exit code
190+
echo "DEBUG: detect_circular_dependencies exit code: $status"
191+
echo "DEBUG: detect_circular_dependencies output:"
192+
echo "$output"
193+
echo ""
194+
164195
[ "$status" -eq 1 ] # Should fail with circular dependency
165196
[[ "$output" == *"Circular dependency detected"* ]]
166197
# Should mention at least one of the circular services

0 commit comments

Comments
 (0)