Skip to content
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

Fix tests #234

Merged
merged 3 commits into from
Dec 19, 2024
Merged

Fix tests #234

merged 3 commits into from
Dec 19, 2024

Conversation

clyang82
Copy link
Contributor

@clyang82 clyang82 commented Dec 17, 2024

We have a question about why the CI passes without this fix, but the local environment does not. The reason is that in the CI environment, PostgreSQL runs in a sidecar container, making it effectively part of the same environment as the test container. In this case, no password is required for the database connection. The following explanation elaborates on this behavior.

Note 1: The PostgreSQL image sets up trust authentication locally so you may notice a password is not required when connecting from localhost (inside the same container). However, a password will be required if connecting from a different host/container.

from https://hub.docker.com/_/postgres

Signed-off-by: clyang82 <[email protected]>
Copy link
Contributor

@morvencao morvencao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@machi1990
Copy link
Contributor

In the modified file, I see some things done to the template1 database and I am wondering if these are things the maesto project wants to carry? e.g

query = fmt.Sprintf("CREATE DATABASE %s TEMPLATE template1", config.Name)

if err := dropConnections(dbx, "template1"); err != nil {

Plus some comments that are not actually true e.g

// Rebuild AMS DB

@clyang82
Copy link
Contributor Author

/assign @qiujian16

@clyang82
Copy link
Contributor Author

I just realized that I should use ConnectionStringWithName instead of ConnectionString to keep the existing behaviour.
@machi1990 take a look at. Thanks.

@machi1990
Copy link
Contributor

I just realized that I should use ConnectionStringWithName instead of ConnectionString to keep the existing behaviour. @machi1990 take a look at. Thanks.

I see comments referencing AMS, can we update them?

@clyang82 clyang82 merged commit 832932f into openshift-online:main Dec 19, 2024
7 checks passed
@clyang82 clyang82 deleted the fix_tests branch December 19, 2024 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants