vmware-archive / virtual-security-module

Virtual Security Module
Other
15 stars 7 forks source link

Automated CLI tests #23

Open asafka opened 7 years ago

vbmade2000 commented 7 years ago

@asafka Can you please provide more detail ?

asafka commented 7 years ago

Thanks for oferring help. Our cli (command-line interface) tool, vsm-cli, can run commands (take a the files under at cli/cmd). We don't have automated tests that test those commands. One needs to come up with a framework for testing the CLI commands and tests for each specific command.

vbmade2000 commented 7 years ago

Cool. I am a Golang newbie and don't have much industrial experience. I may need your help. Is there a way that We can discuss it by some other means ?

asafka commented 7 years ago

Sure, I'll contact you through email.

vbmade2000 commented 7 years ago

@asafka I have joined https://vmwarecode.slack.com. We can discuss there.

vbmade2000 commented 7 years ago

@asafka I have started work on issue.

Any suggestion for test file location ? I have couple of them.

  1. In "/virtual-security-module/cli/cmd/.go"
  2. In "/virtual-security-module/cli_test/.go"
casualjim commented 7 years ago

typically they go next to the file you're writing a test for

source: cli/cmd/main.go test: cli/cmd/main_test.go

vbmade2000 commented 7 years ago

@casualjim Ok. I'll add test according your suggestion. @asafka : By Automated CLI tests do you mean test that call cli executable from Go code and check correct output ?

vbmade2000 commented 7 years ago

@asafka I have created pull request but it fails for coverage. What changes does it require to pass test ?