Package com.redis.vl.test.vcr
Class VCRRegistry
java.lang.Object
com.redis.vl.test.vcr.VCRRegistry
Tracks which tests have been recorded and their status.
The registry maintains metadata about each test in Redis, including:
- Recording status (RECORDED, FAILED, MISSING)
- Timestamp of last recording
- Associated cassette keys
- Error messages for failed tests
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumRecording status for a test. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondetermineEffectiveMode(String testId, VCRMode globalMode) Determines the effective VCR mode for a test based on registry status.Gets all recorded test IDs.getCassetteKeys(String testId) Gets the cassette keys for a test.getTestStatus(String testId) Gets the recording status of a test.voidregisterFailure(String testId, String error) Registers a failed test recording.voidregisterSuccess(String testId, List<String> cassetteKeys) Registers a successful test recording.
-
Constructor Details
-
VCRRegistry
Creates a new VCR registry.- Parameters:
jedis- the Redis client
-
-
Method Details
-
registerSuccess
Registers a successful test recording.- Parameters:
testId- the unique test identifiercassetteKeys- the keys of cassettes recorded for this test
-
registerFailure
Registers a failed test recording.- Parameters:
testId- the unique test identifiererror- the error message
-
getTestStatus
Gets the recording status of a test.- Parameters:
testId- the unique test identifier- Returns:
- the recording status
-
determineEffectiveMode
Determines the effective VCR mode for a test based on registry status.- Parameters:
testId- the unique test identifierglobalMode- the global VCR mode- Returns:
- the effective mode to use for this test
-
getAllRecordedTests
Gets all recorded test IDs.- Returns:
- set of test IDs
-
getCassetteKeys
Gets the cassette keys for a test.- Parameters:
testId- the unique test identifier- Returns:
- set of cassette keys
-