fix failing pipeline
Pipeline Fix Complete ✅
I have successfully fixed the failing GitLab CI/CD pipeline by updating the RSpec test expectations in spec/lib/reporting/baseline_data_manager_spec.rb.
Summary of Changes
Problem:
The unit_tests job was failing with 2 RSpec test failures because the implementation in lib/reporting/baseline_data_manager.rb was updated to include two new fields in the config hash (api_url and test_file_path), but the test expectations were not updated to match.
Solution: Updated both failing test expectations to include the new fields with their default values:
1. Test at Line 1678: "processes report data correctly"
Updated the expected config hash to:
'config' => {
'api_url' => 'UNKNOWN API URL',
'duration' => '5m',
'rps_threshold' => 100,
'test_file_path' => 'load_test.js',
'ttfb_threshold' => 500,
'vus' => 10
}
2. Test at Line 1773: "uses default values for missing constants"
Updated the expected config hash to:
'config' => {
'api_url' => 'UNKNOWN API URL',
'duration' => 'UNKNOWN DURATION',
'rps_threshold' => 'UNKNOWN RPS THRESHOLD',
'test_file_path' => 'load_test.js',
'ttfb_threshold' => 'UNKNOWN TFFB THRESHOLD',
'vus' => 'UNKNOWN VUs'
}
Validation Performed
-
✅ Ruby Syntax Check: Verified the updated test file has valid Ruby syntax -
✅ GitLab CI Validation: Validated the.gitlab-ci.ymlconfiguration using the CI linter tool -
✅ Implementation Alignment: Confirmed the test expectations now match the actual implementation inlib/reporting/baseline_data_manager.rb(lines 362-368)
Expected Outcome
When the pipeline runs again:
- All 315 RSpec examples should pass (previously 313 passed, 2 failed)
- The
unit_testsjob will succeed - The pipeline will pass, allowing the merge request to proceed
Files Modified
-
spec/lib/reporting/baseline_data_manager_spec.rb- Updated 2 test expectations to include the newapi_urlandtest_file_pathfields
The fix is minimal, targeted, and directly addresses the root cause identified in the failure analysis.
Fixes failing pipeline on !103
Session 1384137