-
Notifications
You must be signed in to change notification settings - Fork 244
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
add parameter map population in non-interactive service creation #2040
add parameter map population in non-interactive service creation #2040
Conversation
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.
Code looks good and works well upon testing on my setup. Need some changes in test, IMO.
test is failing, trying to find the best way to get |
/retest |
/retest |
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.
looking good
/approve
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.
Shouldn't we also add support for comma-separating the parameters?
Ex. -p postgresql_database=mydata,postgresql_user=foobar
@@ -127,6 +127,16 @@ func (o *ServiceCreateOptions) Complete(name string, cmd *cobra.Command, args [] | |||
if len(args) == 2 { | |||
o.ServiceName = args[1] | |||
} | |||
|
|||
o.ParametersMap = make(map[string]string) |
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.
Nitpick, but could you add a comment above this line explaining what all of this does? Even if it's a line saying about using odo service create dh-postgresql-apb dh-postgresql-apb --plan dev -p postgresql_database=mydata -p postgresql_password=secret -p postgresql_user=luke -p postgresql_version=10
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.
resolved
|
||
It("should be able to create postgresql with env", func() { | ||
helper.CmdShouldPass("odo", "service", "create", "dh-postgresql-apb", "--project", project, "--app", app, | ||
"--plan", "dev", "-p", "postgresql_user=lukecage", "-p", "postgresql_password=secret", |
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.
Could we add tests regarding using postgresql_user=
or when someone enters it multiple times?
Ex. odo service create dh-postgresql-apb dh-postgresql-apb --plan dev -p postgresql_database=mydata -p postgresql_database=foobar
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.
resolved
I think that is handled by cobra automatically |
/retest |
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.
Thanks for the changes, this LGTM!
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cdrage, mohammedzee1000 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
LGTMing as I see 3 approvals |
@girishramnani: you cannot LGTM your own PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/lgtm |
What is the purpose of this change? What does it change?
add parameter map population in non-interactive service creation.
Was the change discussed in an issue?
fixes #2033
How to test changes?
confirm that env variables get populated and show correctly