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

[Task (CI)]: start postgres server to run graphql e2e tests #1971

Closed
Tracked by #1359
kodemartin opened this issue Aug 21, 2024 · 3 comments · Fixed by #2258
Closed
Tracked by #1359

[Task (CI)]: start postgres server to run graphql e2e tests #1971

kodemartin opened this issue Aug 21, 2024 · 3 comments · Fixed by #2258
Assignees
Labels
sc-platform Issues related to the Smart Contract Platform group.

Comments

@kodemartin
Copy link
Contributor

kodemartin commented Aug 21, 2024

Description

After merging #1969 iota-graphql-e2e-tests will run successfully in a local setup.

Thus, we could run the tests also in the CI, subject to starting a postgres server before running the tests.

The most straight forward way is to use a docker image directly:

docker run -d --name postgres \
 -e POSTGRES_PASSWORD=postgrespw \
 -e POSTGRES_INITDB_ARGS="-U postgres" \
 -p 5432:5432 \
 postgres:15 \
 -c max_connections=1000
@kodemartin kodemartin added the sc-platform Issues related to the Smart Contract Platform group. label Aug 21, 2024
@kodemartin kodemartin added this to the SC-Platform/Testnet milestone Aug 21, 2024
@thibault-martinez
Copy link
Member

According to the Github docs, the way we are using the postgres service is good. I wish there was a way to share the service across workflows because it's used in two of them but couldn't find ahything.

Before I close the issues, some questions for you:

  • Is it important we use postgres:15 specifically?
  • Is it important we set max_connections=1000?
  • Is POSTGRES_INITDB_ARGS="-U postgres" equivalent to POSTGRES_USER=postgres?

I'll adapt our services accordingly.

@kodemartin
Copy link
Contributor Author

* Is it important we use `postgres:15` specifically?

This is the version we use in the iota-private-network and I suppose this is the one that we have already deployed in alphanet. Right @junwei0117 ?

* Is it important we set `max_connections=1000`?

No.

* Is `POSTGRES_INITDB_ARGS="-U postgres"` equivalent to `POSTGRES_USER=postgres`?

No, but not necessary as well, since the current setup works.

Thanks @thibault-martinez

@thibault-martinez
Copy link
Member

* Is it important we use `postgres:15` specifically?

This is the version we use in the iota-private-network and I suppose this is the one that we have already deployed in alphanet. Right @junwei0117 ?

Opened a PR to use postgres:15 for consistency, apart from that I think we're fine to close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sc-platform Issues related to the Smart Contract Platform group.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants