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
Refactor integration tests #71
Conversation
- Replace the use of Segments directly with plain colored text to check stdout - Create temp files in /tmp instead of in $TEMPDIR to ensure we have the necessary file permissions
Building multiple test binaries caused the false positives about dead code. It also makes for much slower testing.
Because the architecture on local machines might not match that on Azure, the pull step will be optional.
By updating tests to use the binary directly, I inadvertently made coverage instrumentation unable to catch our test runs. 🤦♂ |
The decision right now comes down between more thorough end-to-end testing or having code coverage tooling. For the time being, I think the confidence provided by e2e tests outweighs the value of having code coverage. This may change if we find a reliable mocking solution that allows most of our tests to be integration tests.
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.
LGTM! ❤️ 😊
#[test] | ||
#[ignore] | ||
fn git_repo_root() -> io::Result<()> { | ||
// TODO: Investigate why git repo related tests fail when the tempdir is within /tmp/... |
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.
I've noticed this with random software so often. If I put a file in /tmp
, it just fails in some unexpected way. It can't be a permissions issue, I'm really not sure what causes this weirdness.
Sometimes I've stored images in /tmp and been unable to select them in applications. I'd love an explanation. 🤷♀️
Description
Don't be scared off by the number of files changed. I simply moved the test files, and GitHub doesn't play nicely. 😅
starship prompt
will print the full promptstarship module <MODULE_NAME>
will print a specific modulee.g.
starship module python
--path
flag to print the prompt or modules without being in a specific directory--status
flag to provide the status of the last command, instead of requiring it as an argumentusername
moduletests/testsuite
to allow for a single binary to be builtusername
Removing Codecov + tarpaulin
The decision was split between more thorough end-to-end testing or having code coverage tooling. For the time being, I think the confidence provided by e2e tests outweighs the value of having code coverage.
This may change if we find a reliable mocking solution that allows most of our tests to be integration tests.
Motivation and Context
Adding integration tests was difficult. Hopefully, this will be easier to maintain.
Types of changes
Screenshots (if appropriate):
How Has This Been Tested?
Checklist: