-
Notifications
You must be signed in to change notification settings - Fork 3k
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
feat(pops): Flag Tests for the Challenger #5634
Conversation
|
✅ Deploy Preview for opstack-docs canceled.
|
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.
Looks good. We could add tests to confirm that we get an error if required flags aren't supplied as well.
This PR has been added to the merge queue, and will be merged soon. |
This PR is next in line to be merged, and will be merged as soon as checks pass. |
This PR is next in line to be merged, and will be merged as soon as checks pass. |
if envVar == "" { | ||
t.Errorf("Failed to find EnvVar for flag %v", flag.GetName()) | ||
} | ||
if envVar[:len("OP_CHALLENGER_")] != "OP_CHALLENGER_" { |
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.
Can use https://pkg.go.dev/strings#HasPrefix here
Description
Follows @ajsutton's suggestion of adding back in the flags
CheckRequired
when creating the config from cli. Also adds flag tests.