worldcoin / signup-sequencer

signup-sequencer repository
MIT License
68 stars 33 forks source link

Use testcontainers to run postgres database. Disable shutdown tests due to interfering tests (global var impl). #709

Closed piohei closed 4 months ago

piohei commented 5 months ago

Motivation

As discussed: There was a bug (docker containers running after tests) in docker wrapper and to follow direction from other projects testcontainers was introduced here instead. Docker image of postgres is being used for testing. Question: which version of postgres is being used? I think it should match the version running in prod env. There was also a bug in shutdown testing. Tests were interfering due to shutdown being called twice (once from one test and second time from the other). It was causing panic, which was causing process abort (due to rust configuration in Cargo.toml), which was causing strange/hard to understand test results (random tests being red without any special error). This test was disabled for now.

Solution

Introduced testcontainers. Disabled shutdown test.

PR Checklist