feat: migrate e2e tests to testcontainers with per-protocol isolation and DAPR_RUNTIME_VER support#748
feat: migrate e2e tests to testcontainers with per-protocol isolation and DAPR_RUNTIME_VER support#748
Conversation
…ppContainer, containers util) Agent-Logs-Url: https://github.com/dapr/js-sdk/sessions/32772c60-2d98-4b75-8ff7-39b1a7c2d611 Co-authored-by: WhitWaldo <2238529+WhitWaldo@users.noreply.github.com>
… stacks Each protocol now uses a completely separate, isolated set of containers: - 'common/server/http': DaprServer HTTP + DaprContainer (HTTP app protocol) - 'common/server/grpc': DaprServer gRPC + DaprGrpcAppContainer The beforeAll startup order follows the requirement: 1. Start Redis + MQTT containers 2. exposeHostPorts for the app server port 3. Register pubsub subscriptions on the DaprServer 4. Start the DaprServer (so Dapr can call the app for subscription registration) 5. Sleep 2s 6. Start the DaprContainer (connects to the running app) All 30 test cases from the original runIt() pattern are preserved as plain it() tests in each describe block, with per-block mock state. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: WhitWaldo <2238529+WhitWaldo@users.noreply.github.com>
…starts The DaprServer must be created before the DaprContainer (so Dapr can call the app for subscription registration), but its internal DaprClient needs the real mapped container ports for publishing in tests. Fix by replacing the placeholder DaprClient with one pointing to the actual container host/port after the container starts. Also adds DaprClient to the imports and removes the unused buildInMemoryPubSubComponent import. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: WhitWaldo <2238529+WhitWaldo@users.noreply.github.com>
…iner isolation and DAPR_RUNTIME_VER support Agent-Logs-Url: https://github.com/dapr/js-sdk/sessions/32772c60-2d98-4b75-8ff7-39b1a7c2d611 Co-authored-by: WhitWaldo <2238529+WhitWaldo@users.noreply.github.com>
…param) Agent-Logs-Url: https://github.com/dapr/js-sdk/sessions/32772c60-2d98-4b75-8ff7-39b1a7c2d611 Co-authored-by: WhitWaldo <2238529+WhitWaldo@users.noreply.github.com>
|
@copilot Can you please resolve the merge conflicts? |
…tests-to-testcontainers # Conflicts: # package-lock.json Co-authored-by: WhitWaldo <2238529+WhitWaldo@users.noreply.github.com>
Resolved in |
|
@copilot The placement and scheduler images should always use whatever version is used for the dapr runtime version. Can you please fix the various build errors so build and test pass? As part of this PR, can you please also verify that the whole of your implementation also achieves at least 80% test coverage across the whole of the project and disable the existing test-e2e GitHub action? |
…le e2e workflow auto-triggers Agent-Logs-Url: https://github.com/dapr/js-sdk/sessions/01fb7fc5-e79d-42fe-a23a-b6c4a8fc713b Co-authored-by: WhitWaldo <2238529+WhitWaldo@users.noreply.github.com>
Fixed in
|
…ed e2e tests Agent-Logs-Url: https://github.com/dapr/js-sdk/sessions/b50a3ad7-b1db-4cee-b33f-7bb2857cc22c Co-authored-by: WhitWaldo <2238529+WhitWaldo@users.noreply.github.com>
test-e2e-testcontainers.ymlworkflow:workflow_dispatchwith optionaldapr_runtime_verinputdapr init, no static service containers — testcontainers handles all infrastructureDAPR_RUNTIME_VERinto every test steptest/e2e/typescript-build