-
Notifications
You must be signed in to change notification settings - Fork 96
Fix #94: Support custom start parameters. #102
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
Conversation
Add a StartParameters config taking configuration settings. These run-time configuration parameters override those set in the default postgres.conf, and are passed to the postgres process via the options flag of pg_ctl.
@@ -231,7 +231,7 @@ func Test_ErrorWhenCannotStartPostgresProcess(t *testing.T) { | |||
|
|||
err = database.Start() | |||
|
|||
assert.EqualError(t, err, fmt.Sprintf(`could not start postgres using %s/bin/pg_ctl start -w -D %s/data -o "-p 5432"`, extractPath, extractPath)) | |||
assert.EqualError(t, err, fmt.Sprintf(`could not start postgres using %s/bin/pg_ctl start -w -D %s/data -o -p 5432`, extractPath, extractPath)) |
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.
exec.Command actually ensures each of the arguments are passed directly, so we don't need to wrap the whole options string in quotes - in fact, if you do (as I did initially) it causes problems. See https://stackoverflow.com/a/26473771
This is a nice little feature. Could you get it rebased and I'll take it for a spin, then hopefully should be able to get it merged. |
when can this be merged? This is a really helpful feature @fergusstrange |
Will need this rebased and tests passing from @jgiles first @JasonLiuZhuoCheng. |
I saw the tests are all passing. Is it possible that you can help @jgiles rebase and expedite this process? |
@JasonLiuZhuoCheng I can't access this branch. If @jgiles hasn't rebased and pushed it up by this weekend I will look at copying the code over myself. |
I just tested this on a repo where I was getting lots of test failures due to |
That's great, thanks @felipecsl. I'm going to close this and have rebased it manually myself here. Should merge and release soon. |
Add a StartParameters config taking configuration settings.
These run-time configuration parameters override those set in the default postgres.conf, and are passed to the postgres process via the options flag of pg_ctl.