-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Do not hard-code PostgreSQL credentials in tester file #2339
Conversation
I think |
and then you would probably not need |
Adding these lines somewhere in the beginning of
and using your |
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.
Do not change .drone.yml
file but make changes only to Makefile
as I suggested in comments
the reason I had to make these changes was to be able to run Note I already changed .drone.yml in this PR. And I'm happy to see there was no need to update the signature file (drone/pr build succeeds) |
I dunno why those many changes were added to the .ini file though, I only removed 3 lines, must be something related to .editorconfig, should I revert-clean ? |
ee413ee
to
3b1bbed
Compare
force-pushed after cleaning up the changes in .ini file |
The changes are created by |
oh, that's an issue that should also be fixed (maybe in a different PR). |
I automatically do a |
@strk if you have these variables set makefile wont change them but just reuse yours. |
Looks like you also need to change:
to:
|
Using `?=` would still force an env variable when all you want is the
libpq default (ie: compile-time default to using custom TCP port, for instance)
What's wrong with relying on libpq default ?
|
ok, you convinced me through I will still need to set env variables to run tests 👍 |
@go-gitea/owners does .drone.yml needs to be signed again? |
otherwise LGTM |
As #2484 is merged are these changes still needed? |
3b1bbed
to
38cebbb
Compare
Well I like it more to be able to use my already-existing environment rather than (as done by #2484) enforce the use of custom env variables... I've rebased to master and fixed conflicts. |
The thing is that enforcing a setting for PG host/user/port prevents using libpq defaults. I like the idea of using what already exists (defaults) |
The integration test actually still fails for me :(
Ideas ? |
pghost must be pgsql not 127.0.0.1 in drone |
I don't think it's correct to use user defaults for integration tests as at least for me PG defaults are used for PostgreSQL admin user (username&host) so I don't have to use that for psql command. I would not like to use them for integration tests. Current approach is more configurable for everyone as you can set specific environment variables just for gitea and easily run just make test-pgsql |
This allows running tests against non-default installs
6d03e5e
to
59f6cee
Compare
Closing as outdated. Please re-open as needed. |
This allows running tests against non-default installs
NOTE: I suppose the change in .drone.yml will require signing it
again, which I cannot do. Can you help @lunny $bkcsoft $appleboy ?