-
Notifications
You must be signed in to change notification settings - Fork 57
Add VCR infrastructure for DSL functional tests #655
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
base: main
Are you sure you want to change the base?
Conversation
8a0efda to
0125231
Compare
|
@juniper-shopify updated approach to add VCR support for the functional tests. I can iterate on this a bit more if this looks right to you 🙏 |
30df328 to
5e039a8
Compare
This doesn't actually work. You need to also delete the cassette file that you want to re-record. |
juniper-shopify
left a comment
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.
You're on the right track here. I think this is good.
A few functional issues to work through, but I like the direction
3efad62 to
542abbc
Compare
@juniper-shopify I missed this comment earlier as I was focused on the inline comments, so would have to backtrack a bit to see what the issue was that you were getting. Mind sharing the stacktrace or response you were getting so I can see what the issue was? I'm also adding Please LMK if it works for you now! Also added a new class for rewriting the vcr config, with tests. Given it's EOD EDT I imagine this one may carry over to the new year, so can split this work into a stack for better reviewing/testing, when I get back |
fae0f42 to
9216de6
Compare
9216de6 to
b896a98
Compare
dersam
left a comment
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 PR removes a number of the useful test abstractions from the original functional test system, and reimplements several VCR features. Please refactor.
VCR will only record a new cassette if one doesn't already exist. If you need to replace the cassette and hit the proxy live, the old related cassette needs to be deleted. |
2f4c749 to
1daa26d
Compare
a582347 to
e47a46c
Compare
|
@dersam if I'm missing anything here now just lmk 🙏 |
test/test_helper.rb
Outdated
| skip "slow test" unless ["1", "true"].include?(ENV["ROAST_RUN_SLOW_TESTS"]) | ||
| end | ||
|
|
||
| # Set dummy credentials for tests (VCR will filter these in recordings) |
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.
What's the point of overwriting these credentials? When recording, real creds are necessary and will be filtered by filter_sensitive_data. Is there a reason this is needed during replay?
594c8c5 to
d4c4ba2
Compare
d4c4ba2 to
387f296
Compare
387f296 to
bc4a3d5
Compare

Add VCR Infrastructure for DSL Workflow Tests
Added VCR support for DSL workflow tests to enable reliable HTTP request recording and playback.
What changed?
VCRURLRewritermodule to handle API endpoint transformations for cassette portabilityvcr_test_workflow.rbthat makes a simple LLM query about the deepest lakeHow to test?
In replay mode (default):
To record new cassettes:
Why make this change?
This change improves test reliability by eliminating dependencies on external API services during testing. By recording API interactions once and playing them back during subsequent test runs, we can: