Conversation
|
I'm not happy with this. Shell scripts are horrible in many ways. Some arguments, why we shouldn't rely on shell scripts:
If there's no way to make the |
|
Honestly, I'm not a huge fan of the shell tests either. I'd be down for support both sh and go tests so we can experiment with some single file go tests like you suggested. If we find a pattern that works, we can then move tests back to go one by one. But there's nothing about the current Go test stuff that I want to keep. |
|
FWIW here's another attempt at Go tests containing simpler declarative statements like the shell tests. https://github.com/github/git-lfs/pull/291/files#diff-85b5fd21f7c36d3ba95b3a6fc0225941 I'm merging this so we can move forward on some other PRs. Still open to the idea of exploring single file go tests, though. |
|
👍 |
The "git lfs ls-files" command was added in PR git-lfs#122 (technically, the precursor "git media ls-files" command) and its test suite converted to shell tests in PR git-lfs#336; however, the basic functionality of the command has never had tests which confirm it handles files in subdirectories appropriately. (Some tests added in later PRs which do check files in subdirectories under specific conditions, such as with the --exclude option or with non-ASCII characters in subdirectory names.) As we expect to expand this command's test suite in subsequent commits in this PR, we first add a new test which simply confirms that the normal output of the command, and the output with the --debug option, perform as expected when files have been both added and removed within a subdirectory. We also add a test which confirms the same behaviour when the --json option is used. The use of a separate test for this option was preferred in PR git-lfs#5007 when the --json option was first introduced (rather than overloading the existing tests, as was done for the --debug option when it was added in PR git-lfs#2540), so we follow that model here as well.
This moves all the tests from the
commandspackage to the new shell tests.