Generate testing certificates as part of the docker database initialization
Soremwar opened this issue · 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
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.
I understand that, but I'd rather have it automated if possible
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