postgres icon indicating copy to clipboard operation
postgres copied to clipboard

Generate testing certificates as part of the docker database initialization

Open Soremwar opened this issue 4 years ago • 3 comments

My only concern with #308 is that the current testing workflow requires the contributors to manually run a script to generate the required certificates, instead of abstracting away that configuration as part of the normal docker initialization

This might require stepping away from using the official docker image of postgres and building one of our own due to the following reasons:

  • We require the generated certificate to be available on the host file system to make it accessible from the tests, however docker volumes are not writable without the proper permissions. So it would be removing the need to run one command in the CLI to run another
  • We need persistance of the certificates so when the database containers are run from cache the certificates are still available to be used by the driver, this might require moving the certificates to a different location that can reflect live changes to them, instead of copying them inside the container after being generated

Soremwar avatar Sep 28 '21 22:09 Soremwar

the contributors to manually run a script to generate the required certificates

This only needs to be run once a year and then the results can be checked into the repo, so should not impact any contributors.

lucacasonato avatar Sep 28 '21 22:09 lucacasonato

I understand that, but I'd rather have it automated if possible

Soremwar avatar Sep 28 '21 22:09 Soremwar

Just occurred to me I can spin up an http server that returns the generated certificates to me. Works both locally and on CI. Will implement soon

Soremwar avatar Nov 08 '21 17:11 Soremwar