Conversation
pkg/quarkus/v1alpha/init_test.go
Outdated
| flagTest := pflag.NewFlagSet("testFlag", -1) | ||
| // Need clarification on what to set ErrorHandlingNumber as |
There was a problem hiding this comment.
Some suggestions on what to put as the "default" ErrorHandlingNumber (currently -1) would be helpful.
pkg/quarkus/v1alpha/init_test.go
Outdated
| testConfig, _ := config.New(config.Version{Number: 3}) | ||
| // Need clarification on what to set Version number as |
There was a problem hiding this comment.
Here as well - suggestions on what to set as the version number would be helpful.
EDIT: Tested it out with a bunch of different values. 3 seems to be the only acceptable number.
|
Also, I did not write a test for the If you want me to dig into it and write a test for |
91c963f to
e744bff
Compare
|
Everything is working perfect. |
|
/lgtm |
jmrodri
left a comment
There was a problem hiding this comment.
Update the test similar to the other PR comments.
pkg/quarkus/v1alpha/init_test.go
Outdated
| successInitSubcommand := &initSubcommand{domain: "testDomain"} | ||
| failureInitSubcommand := &initSubcommand{ | ||
| domain: "testDomain", | ||
| projectName: "?&fail&?", | ||
| commandName: "failureTest", | ||
| } |
There was a problem hiding this comment.
Put in a BeforeEach block. that way each test has a fresh version that hasn't been affected by any changes from subsequent test.
pkg/quarkus/v1alpha/init_test.go
Outdated
| Expect(failureInitSubcommand.commandName).NotTo(Equal(testCliMetadata.CommandName)) | ||
| }) | ||
|
|
||
| successInitSubcommand.UpdateMetadata(testCliMetadata, &testSubcommandMetadata) |
e744bff to
8ececbd
Compare
8ececbd to
cfaf7e9
Compare
cfaf7e9 to
5536168
Compare
Added unit tests for v1alpha/init.go along with the suite tests for the v1 package.