Tests fail when using fish (and possibly other shells)
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 305
- Forks
- 46
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 23
Description
Description
When attempting to run tests under fish, the following errors are incorrectly thrown:
--- FAIL: TestDeployCommand_DeployHook (11.06s)
--- FAIL: TestDeployCommand_DeployHook/fails_to_execute_an_unknown_script_path (2.31s)
deploy_test.go:294:
Error Trace: github.com/slackapi/slack-cli/cmd/platform/deploy_test.go:294
Error: Should be true
Test: TestDeployCommand_DeployHook/fails_to_execute_an_unknown_script_path
--- FAIL: TestDeployCommand_DeployHook/echos_stderr_output_to_standard_err (2.20s)
deploy_test.go:296:
Error Trace: github.com/slackapi/slack-cli/cmd/platform/deploy_test.go:296
Error: Received unexpected error:
Error running 'Deploy' command: exit status 127 (sdk_hook_invocation_failed)
Suggestion
Run `platform.test doctor` to check that your system dependencies are up-to-date.
Test: TestDeployCommand_DeployHook/echos_stderr_output_to_standard_err
FAIL
FAIL github.com/slackapi/slack-cli/cmd/platform 11.953s
This seems to be due to a dependency on particular shell syntax/messages in the tests.
Version
Using slack-cli v3.15.0
OS Info
Arch Linux (under WSL2)
Steps to reproduce:
Share the commands to run, source code, and project settings:
- Build.
go test ./...
Expected result:
I expected the tests to pass.
Actual result:
The tests failed, as shown above.
Requirements
- I've read and understood the Contributing guidelines and have done my best effort to follow them.
- I've read and agree to the Code of Conduct.
- I've searched for any related issues and avoided creating a duplicate issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with cmd/platform/deploy_test.go, especially TestDeployCommand_DeployHook and the failing cases at lines 294 and 296. Run go test ./... under fish, inspect the shell syntax and expected messages used by these tests, and consider the work done when the deploy hook tests pass without shell-specific failures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fish, go
- Domain
- cli, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100