green-metrics-tool
green-metrics-tool copied to clipboard
Check if database is created completely
While refactoring an index condition wasn't updated:
https://github.com/green-coding-berlin/green-metrics-tool/blame/6df80f107d8c9a1733d5b431e51fb7034d5fd158/docker/structure.sql#L161
https://github.com/green-coding-berlin/green-metrics-tool/blame/6df80f107d8c9a1733d5b431e51fb7034d5fd158/docker/structure.sql#L173
which didn't show up in the tests as we currently don't have any tests for the hog. So the docker container would create the tables and then bail on the faulty index condition not creating the following stuff. We should have a test that the structure.sql runs in one transaction and doesn't fail.
There are a few ways we can do this.
- write a test that checks if the script runs without errors
- put the structure.sql in one transaction
- there are more.... to discuss in person on a Tuesday