Commit 5bc3bc3
authored
feat: add test-support feature for consumer testing (#43)
Add a new test-support feature that provides mock server utilities
and fixtures for testing code that uses the redis-cloud client library.
The testing module includes:
- MockCloudServer: A pre-configured mock server wrapper around wiremock
with convenience methods for common Redis Cloud API endpoints
- Fixtures: Builder-pattern fixtures for Subscription, Database, Task,
Account, and User responses
- Response helpers: Convenience functions for creating success and error
HTTP responses (success, created, accepted, not_found, rate_limited, etc.)
Consumers can enable this with:
redis-cloud = { version = "0.8", features = ["test-support"] }
This mirrors the test-support feature already available in redis-enterprise.1 parent 86f480f commit 5bc3bc3
File tree
6 files changed
+1336
-0
lines changed- src
- testing
6 files changed
+1336
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
36 | 41 | | |
37 | 42 | | |
38 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
298 | 302 | | |
299 | 303 | | |
300 | 304 | | |
| |||
0 commit comments