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

  1. Ruby Syntax Check: Verified the updated test file has valid Ruby syntax
  2. GitLab CI Validation: Validated the .gitlab-ci.yml configuration using the CI linter tool
  3. Implementation Alignment: Confirmed the test expectations now match the actual implementation in lib/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_tests job 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 new api_url and test_file_path fields

The fix is minimal, targeted, and directly addresses the root cause identified in the failure analysis.


Fixes failing pipeline on !103

Session 1384137

Edited by Vishal Patel

Merge request reports

Loading