Removes test of default editor passthrough from git #1080
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reviewers
r? @charliecruzan-stripe
cc @stripe/developer-products
Summary
I set up the stripe CLI for the first time on my laptop today and ran
make test
as suggested by the README. Everything passed except for one test, which tests that when an editor preference is not given to git that it uses a preference from the current environment (theEDITOR
variable). I keepEDITOR
set tovim
on my system, which causes the test to fail as it wantsvi
explicitly.My gut feeling is that this test isn't really covering functionality that's unique to the Stripe CLI, and is instead covering how git's editor defaults are computed. I thought about setting
EDITOR
in the test's setup, which would have to change based onruntime.GOOS
. Then I figured that we might just be better off without the test at all, if all we're doing is checking thatgit
grabs its editor default from the environment? 🤷Anyway, happy to reverse course on this and keep the test with some setup to make it more durable when
EDITOR
is set if we'd prefer to keep it! Just let me know :)Testing
Originally fails in the following manner on my system:
and it's reproducable based on whatever you set
EDITOR
to (like/bin/shuf
, a nefarious trick):After this change tests now pass for me locally, even when
EDITOR
is set to something else: