-
Notifications
You must be signed in to change notification settings - Fork 89
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
Env Variable TEST_MODE works as expected #909
Conversation
Enforce that DVR record-playback honors environment variables
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. I'm assuming it depends on a yet-to-be-opened PR against DVR?
Closes #906. |
Depends on: tjprescott/DVR#1 |
Conflicts: sdk/communication/AzureCommunicationChat/AzureCommunicationChat.xcodeproj/xcshareddata/xcschemes/AzureCommunicationChat.xcscheme
Local Changes that need to be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tjprescott Please take a look when you get a chance.
@@ -64,8 +64,14 @@ public class DVRSessionTransport: TransportStage { | |||
} | |||
session = Session(outputDirectory: outputDirectory, cassetteName: cassetteName) | |||
if environmentVariable(forKey: "TEST_MODE", default: "playback") == "record" { | |||
session?.recordMode = .newEpisodes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If in record mode, this should be .all
. I don't think we'll use .once
or .newEpisodes
at all.
…s into feature/re-record
* Initial commit for AzureTest. * AzureTest DVR commit. * Rename "AzureTestClient" to "ResourceUtilityClient". Eliminate MSAL dependency for AzureTest. * Add util function to AzureTest to get environment variables (moved out of Chat). * DVR updates. (#896) * Update DVR references to point to fork rather than venmo (#903) * Update DVR references to point to fork rather than venmo. * Remove static linkage to DVR. * Recordings on a per-test basis (#904) * Feature/recording location (#907) * Environment Variable for sdk root * Revert project.pbxproj * Edit to outputDirectory construction * Env Variable TEST_MODE works as expected (#909) * Environment Variable for sdk root Enforce that DVR record-playback honors environment variables * Environment Variables work as intended with the new DVR updates * Undo Podfile Changes Local Changes that need to be removed * Slight edit to record mode Co-authored-by: Jair Myree <[email protected]> * Automated means of creating test resources (#912) * Add resource group delete operation. * Progress. * Project setting fixes. * Add test-resources.bicep file. * Update bicep file. * Target python script in test resource deploy post-script. * Remove ResourceUtil files and dependencies. * Revert to previous output style. * Remove empty environment variable. (#919) * Injectable test settings (#924) * Commit test-settings.plist and git-ignore. * TestSettings protocol. * Update Podfile for DVR * Don't use local DVR * Chat test updates. * Add recordings to project. * Update prepare_chat_tests.py * Update deployment targets. * Add podspec. * Add readme. * Fix hard-coded links. * Scrub headings and commit chat test recordings. (#935) * Remove headers. * Add scrubbed recordings. * Feature/scrub subscription ids (#932) * Major edits toward scrubbing subscription IDs * Minor edits on scrubbing * Update sdk/test/AzureTest/Scrubbing.swift Co-authored-by: Travis Prescott <[email protected]> * Update sdk/test/AzureTest/Scrubbing.swift Co-authored-by: Travis Prescott <[email protected]> * Update sdk/test/AzureTest/Scrubbing.swift Co-authored-by: Travis Prescott <[email protected]> * Update sdk/test/AzureTest/Scrubbing.swift Co-authored-by: Travis Prescott <[email protected]> * Recommit: Files changes got left out of last commit * Requested Draft PR changes * Clean up after rebase * Testing response scrubbing in progress * Finished Scrubbing SubscriptionIDs * Adjustments made to PR based on review comments. * Edits to PR based on review comments * Update sdk/test/AzureTest/AzureTestTests/AzureTestTests.swift Co-authored-by: Travis Prescott <[email protected]> * More edits based of pr review * More edits to pr based off of review comments * More edits to PR based off suggestions in review * More edits to PR from review comments * Removed unused functions and extensions * Edits to PR based off review comments * Edits to PR from review comments * Edits based off PR review comments Co-authored-by: Jair Myree <[email protected]> Co-authored-by: Travis Prescott <[email protected]> * RPF: RecordableXCTestCase (#963) * Add base class for recordable tests. * Run swiftformat. * CI fixes. * Fix podspec source_files. * Fix project structure. * Fixes * Fix broken links. * CI fixes. * Remove test-settings.plist reference. * Re-record tests. * Fix tests for playback. Co-authored-by: Jair <[email protected]> Co-authored-by: Jair Myree <[email protected]>
Enforce that DVR record-playback honors environment variables
Live will ignore recordings and always run live
Record will ignore recordings, run live, and create a new recording
Playback will only play recordings and fail if the recording isn't valid or does not exist.
Closes #906