RI-7632 Added RDI factories#5434
Open
valkirilov wants to merge 10 commits intofeature/RI-7632-rdi-api-v2-supportfrom
Open
RI-7632 Added RDI factories#5434valkirilov wants to merge 10 commits intofeature/RI-7632-rdi-api-v2-supportfrom
valkirilov wants to merge 10 commits intofeature/RI-7632-rdi-api-v2-supportfrom
Conversation
…2-rdi-api-v2-statistics-rework-v2-client
- introduced factories for mocking test data - apply example factories to the new RDI API mocks re #RI-763
Contributor
Code Coverage - Backend unit tests
Test suite run success3089 tests passing in 293 suites. Report generated by 🧪jest coverage report action from 632c6e5 |
| faker.number.int({ min: 1, max: 3 }), | ||
| ), | ||
| }), | ||
| ); |
There was a problem hiding this comment.
Exported factories are never used in codebase
Low Severity
RdiPipelineStatusFactory and ComponentStatusFactory are defined and exported but never imported or used anywhere in the codebase. ComponentStatusFactory is only referenced internally by RdiPipelineStatusFactory, which itself has no usages. The tests use the V1/V2 API response factories instead of these domain model factories. These exported factories are dead code that could be removed or marked as intentional infrastructure for future tests.
Additional Locations (1)
Base automatically changed from
feature/RI-7632-rdi-api-v2-status-rework
to
feature/RI-7632-rdi-api-v2-support
February 3, 2026 12:22
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.


What
Added factories in the back-end
Testing
Simply run the tests.
Unit tests
Integration tests
Note
Low Risk
Test-only changes that refactor mock data creation; low production risk, with a small chance of introducing flaky tests if random factory defaults leak into assertions.
Overview
Adds a centralized set of
fishery/fakerfactories undersrc/__mocks__/factories/rdito generate RDI domain models and V1/V2 API response shapes (info, pipeline, status, statistics, dry-run jobs).Refactors existing RDI mocks (
src/__mocks__/rdi.ts) and multiple RDI tests (V1 status transformer, V2 client, and pipeline status integration test) to build fixtures via these factories, keeping legacy exported mocks deterministic by overriding factory fields where needed.Written by Cursor Bugbot for commit 632c6e5. This will update automatically on new commits. Configure here.