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

Run the client and CLI tests with the testbed server in postgre mode #9426

Open
vxgmichel opened this issue Jan 24, 2025 · 0 comments
Open
Labels
A-Server Area: Parsec Server I-CICD Impact: CI/CD, automated stuff on this repo I-Test Test-related issue

Comments

@vxgmichel
Copy link
Contributor

vxgmichel commented Jan 24, 2025

Those tests typically never run with postgresql, which could help find bugs.

Here is the procedure:

# [Shell 1] Run a postgresql cluster 
$ cd server
$ PG_CLUSTER_PORT=38135 pytest --run-postgresql-cluster
Creating PostgreSQL cluster...
PostgreSQL url:  postgresql://postgres@localhost:38135/postgres
usage: PG_URL=postgresql://postgres@localhost:38135/postgres py.test --postgresql tests
Press enter when you're done with...

# [Shell 2] Run a testbed server with the cluster
$ parsec testbed --with-postgresql postgresql://postgres@localhost:38135/postgres
2025-01-24T15:53:55.832483Z [info     ] Parsec version                 version=3.2.5-a.0+dev
All set !
Don't forget to export `TESTBED_SERVER` environ variable:
export TESTBED_SERVER='parsec3://127.0.0.1:6770?no_ssl=true'
2025-01-24T15:53:55.855393Z [info     ] Started server process [120107]
2025-01-24T15:53:55.855655Z [info     ] Uvicorn running on http://127.0.0.1:6770 (Press CTRL+C to quit)

# [Shell 3] Run the client tests in sequential mode
$ export TESTBED_SERVER='parsec3://127.0.0.1:6770?no_ssl=true'
$ cargo nextest run -p libparsec_client -j 1

# Then run the client tests in sequential mode
$ export TESTBED_SERVER='parsec3://127.0.0.1:6770?no_ssl=true'
$ cargo build -p parsec-cli
$ cargo nextest run -p parsec-cli -j 1 

Those tests could be integrated in a daily job in the CI.

@FirelightFlagboy FirelightFlagboy added I-Test Test-related issue A-Server Area: Parsec Server labels Jan 29, 2025
@mmmarcos mmmarcos added the I-CICD Impact: CI/CD, automated stuff on this repo label Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Server Area: Parsec Server I-CICD Impact: CI/CD, automated stuff on this repo I-Test Test-related issue
Projects
None yet
Development

No branches or pull requests

3 participants