Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize invocation context before test fixture creation. #9529

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

peterallenwebb
Copy link
Contributor

Problem

The code used to set up test fixtures sometimes uses environment variables via the new InvocationContext mechanism, but it was not always initialized in time.

Solution

Add an initialization function to the test fixtures, and set an invocation context in that function.

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX
  • This PR includes type annotations for new and modified functions

@peterallenwebb peterallenwebb requested a review from a team as a code owner February 6, 2024 21:17
@cla-bot cla-bot bot added the cla:yes label Feb 6, 2024
Copy link

codecov bot commented Feb 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (15dcb9a) 87.93% compared to head (9d4c62e) 87.89%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9529      +/-   ##
==========================================
- Coverage   87.93%   87.89%   -0.04%     
==========================================
  Files         167      167              
  Lines       22172    22176       +4     
==========================================
- Hits        19497    19492       -5     
- Misses       2675     2684       +9     
Flag Coverage Δ
integration 85.47% <100.00%> (-0.11%) ⬇️
unit 61.84% <60.00%> (+<0.01%) ⬆️

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

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

Copy link
Contributor

@QMalcolm QMalcolm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for hunting down this issue 🙇

@peterallenwebb peterallenwebb merged commit e33b06b into main Feb 7, 2024
55 checks passed
@peterallenwebb peterallenwebb deleted the paw/invocation-context-fix branch February 7, 2024 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants