feat(spicedb): add testcontainer module for SpiceDB #1498
+456
−71
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 does this PR do?
This PR adds a new SpiceDB module to the Testcontainers for .NET library, providing seamless integration for testing applications that use SpiceDB (Google Zanzibar-inspired permissions database).
Key components added:
SpiceDBContainer
: Container wrapper with SpiceDB-specific functionality including connection string generationSpiceDBBuilder
: Fluent builder for configuring SpiceDB containers with sensible defaultsSpiceDBConfiguration
: Configuration class following the established Testcontainers patternTechnical details:
authzed/spicedb:v1.45.1
Docker image50051
Why is it important?
SpiceDB is gaining significant adoption as a robust authorization service, especially for applications requiring fine-grained permissions at scale. This module enables developers to:
This addition expands Testcontainers' coverage into the authorization/permissions domain, complementing the existing database and messaging modules.
Related issues
How to test this PR
Prerequisites:
Testing steps:
Build the solution:
Run SpiceDB tests specifically:
dotnet test tests/Testcontainers.SpiceDB.Tests/
Run all tests to ensure no regressions:
dotnet test
Verify documentation builds correctly:
# Check that the documentation is properly formatted cat docs/modules/spicedb.md
Expected test results:
Follow-ups
Potential enhancements for future PRs:
null
- should return proper gRPC connection string formatDocumentation improvements: