Skip to content
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: refactor test functions and remove unused variables #476

Merged
merged 2 commits into from
Oct 18, 2023

Conversation

appleboy
Copy link
Contributor

@appleboy appleboy commented Oct 17, 2023

  • Remove the runArgs variable
  • Change the way flag.CommandLine.Parse is called
  • Modify the TestBinCmdPath function
  • Modify the TestConfigWithRuntimeArgs function
  • Modify the TestCtrlCWhenHaveKillDelay function
  • Modify the include_file value in the TestCtrlCWhenHaveKillDelay function
  • Modify the include_file value in the TestConfigRuntimeArgs function
  • Modify the TestFlag function
  • Modify the TestConfigRuntimeArgs function
  • Modify the Test_killCmd_SendInterrupt_false function
  • Modify the bytesRead variable in the Test_killCmd_SendInterrupt_false function

also fix #439

@appleboy
Copy link
Contributor Author

Any feedbacks? @xiantang

@xiantang
Copy link
Collaborator

will check

main.go Show resolved Hide resolved
runner/flag_test.go Outdated Show resolved Hide resolved
runner/flag_test.go Outdated Show resolved Hide resolved
runner/util_test.go Outdated Show resolved Hide resolved
- Remove the `runArgs` variable
- Change the way `flag.CommandLine.Parse` is called
- Modify the `TestBinCmdPath` function
- Modify the `TestConfigWithRuntimeArgs` function
- Modify the `TestCtrlCWhenHaveKillDelay` function
- Modify the `include_file` value in the `TestCtrlCWhenHaveKillDelay` function
- Modify the `include_file` value in the `TestConfigRuntimeArgs` function
- Modify the `TestFlag` function
- Modify the `TestConfigRuntimeArgs` function
- Modify the `Test_killCmd_SendInterrupt_false` function
- Modify the `bytesRead` variable in the `Test_killCmd_SendInterrupt_false` function

Signed-off-by: Bo-Yi Wu <[email protected]>
Signed-off-by: appleboy <[email protected]>
@appleboy
Copy link
Contributor Author

@xiantang all done 21652ec

@xiantang xiantang merged commit bf9ec3c into air-verse:master Oct 18, 2023
2 checks passed
@appleboy appleboy deleted the test branch October 18, 2023 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants