Skip to content

Can now pass environment variables into daprd container during integration tests - #1871

Merged
WhitWaldo merged 3 commits into
masterfrom
testcontainers-envvars
Jul 13, 2026
Merged

Can now pass environment variables into daprd container during integration tests#1871
WhitWaldo merged 3 commits into
masterfrom
testcontainers-envvars

Conversation

@WhitWaldo

Copy link
Copy Markdown
Contributor

Description

Added endpoint to fluently pass environment variables into daprd container as part of integration testing with Dapr.Testcontainers.

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #1860

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

…ntegration testing with `Dapr.Testcontainers`

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
@WhitWaldo WhitWaldo added this to the v1.19 milestone Jul 12, 2026
@WhitWaldo WhitWaldo self-assigned this Jul 12, 2026
@WhitWaldo
WhitWaldo requested review from a team as code owners July 12, 2026 20:50
@codecov

codecov Bot commented Jul 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.15%. Comparing base (ff3d82c) to head (f7fcfa3).

Files with missing lines Patch % Lines
...r.Testcontainers/Containers/Dapr/DaprdContainer.cs 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1871      +/-   ##
==========================================
+ Coverage   62.14%   62.15%   +0.01%     
==========================================
  Files         334      334              
  Lines        9719     9727       +8     
  Branches     1132     1133       +1     
==========================================
+ Hits         6040     6046       +6     
- Misses       3361     3363       +2     
  Partials      318      318              
Flag Coverage Δ
net10.0 62.11% <75.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@WhitWaldo
WhitWaldo merged commit f6041fa into master Jul 13, 2026
1233 of 1239 checks passed
@WhitWaldo
WhitWaldo deleted the testcontainers-envvars branch July 13, 2026 05:03
WhitWaldo added a commit that referenced this pull request Jul 13, 2026
…1873)

* Fixing workflow tracing + adding observability integration testing (#1870)

* Implementing better trace support in Dapr.Workflow + adding e2e testing to `Dapr.Testcontainers` to more properly validate it.
* Added functionality to `Dapr.Testcontainers` to support capturing telemetry from the Zipkin endpoint on the Dapr runtime to add to the integration testing suite
* Added a series of integration tests to validate proper telemetry capture across various scenarios:
- Activity runtime-to-SDK span continuity
- Child workflow activity tracing
- Retry attempts
- Fan-out/fan-in parallel activities
- Timer plus external event before activity execution
- Multi-app remote activity
- Activity failure span status
- Continue-as-new
- Multi-app child workflow
- Downstream custom ActivitySource parented under the workflow activity span
- Suspend/resume (validate activity after resume)
- Re-run workflow (validating spans for rerun instance)
- History propagation with OwnHistory
- History propagation with Lineage
- Parallel child workflows, validating each child activity trace
- Terminate (validating for work completed before termination and terminated history)
- Caught activity failure/compensation (validate activity span is marked error
- Workflow failure after activity failure (validate trace when activity failure is not caught and workflow ends as failed)
- Child workflow + activity in both parent and child (validates activity in the child)

* Corrected to validate that the `Dapr.Workflow` activity span exists with the expected display name, the span has the same trace id as the runtime span, the span's ParentSpanId equals the runtime span Id and that the runtime exports a Zipkin activity span with the expected runtime name

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Improved existing orchestration tests to make them more closely resemble accurate scenarios and requirements

---------

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Added mechanism to pass environment variables into daprd as part of integration testing with `Dapr.Testcontainers` (#1871)

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

---------

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dapr.Testcontainers - support passing arbitrary environment variables to the daprd container

1 participant