-
Notifications
You must be signed in to change notification settings - Fork 725
Conversation
cmd/config_test.go
Outdated
t.Fatal(err) | ||
} | ||
|
||
config, err := LoadConfig(path.Join(cwd, "..", "config", "example.yaml")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somewhat conflicted about using an example file as a test input. It does make sure that the example is valid to some degree. On the other hand it is really unexpected to have an example be part of a test case.
I do not have much experience with generated documentation, but I feel like this would be another potential use case for it (besides the documentation of supported AWS resources).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had the same doubts. I added another test config for the tests.
cmd/config.go
Outdated
@@ -51,6 +53,40 @@ func (c *NukeConfig) InBlacklist(searchID string) bool { | |||
return false | |||
} | |||
|
|||
func (c *NukeConfig) ValidateAccount(accountID string, aliases []string) (*NukeConfigAccount, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Imho, I liked the old signature of ValidateAccount
, where it only validates and returns error(s).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's very true. Fixed.
awsutil
package to slim downcmd
packageNuke
to the actual config struct@rebuy-de/prp-aws-nuke Please review.
This is a preparation for #66.