chore(TestServer): add multilanguage test server, run in CI#3
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds a multilanguage test server framework to the S3 Encryption Client Python repository for cross-language compatibility testing in CI. The framework uses Smithy to define a shared API model and provides both Java and Python server implementations.
- Adds a Smithy-based test server with model definitions for S3EC operations
- Implements Java and Python server versions that expose S3 Encryption Client functionality via HTTP APIs
- Creates comprehensive Java integration tests that verify cross-language interoperability
Reviewed Changes
Copilot reviewed 40 out of 43 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
| test-server/model/ | Smithy API definitions for test server interface |
| test-server/java-server/ | Java server implementation using generated Smithy stubs |
| test-server/python-server/ | Python FastAPI server implementation |
| test-server/java-tests/ | Java integration tests for cross-language validation |
| test-server/Makefile | Build and orchestration scripts for running servers and tests |
| .github/workflows/test.yml | CI integration for automated test execution |
| cdk/lib/cdk-stack.ts | AWS infrastructure updates for test server resources |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| - `GET /` - Welcome message | ||
| - `POST /get-beer` - Get a beer with specified ID | ||
| - Request body: `{"Id": "string"}` | ||
| - Response: `{"beer": "beer{Id}"}` |
There was a problem hiding this comment.
This documentation describes a non-existent endpoint and should be removed or corrected.
| - Response: `{"beer": "beer{Id}"}` |
| } | ||
| } | ||
|
|
||
| @ParameterizedTest(name = "{displayName} for Encrypt: Java, Decrypt: {0}") |
There was a problem hiding this comment.
Worth considering whether it's appropriate to test Java-decrypt here as long as this is just in the S3EC-Python repo
There was a problem hiding this comment.
Yeah. I think for now, I'm fine leaving it a bit loose, and when we figure out how to apply the TestServer to multiple repos, we can come up with a more robust solution.
| @@ -0,0 +1,61 @@ | |||
| # S3EC Generalized Robust Test Framework Machine | |||
|
|
|||
| Or G-RTFM. Or something. | |||
| import java.util.concurrent.ConcurrentHashMap; | ||
| import java.util.concurrent.ExecutionException; | ||
| import software.amazon.smithy.java.server.Server; | ||
| import software.amazon.encryption.s3.service.S3ECTestServer; |
There was a problem hiding this comment.
Where is this defined? It's somewhere since the CI is passing but I can't find it, I think this is the smithy-generated shape
There was a problem hiding this comment.
Which import specifically? The first two highlighted are Java stdlib and the second two are Smithy-generated.
Issue #, if available:
Description of changes:
Adds the smithy-based multilanguage TestServer to S3EC Python repo and runs it in CI. Some notes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.