green-metrics-tool icon indicating copy to clipboard operation
green-metrics-tool copied to clipboard

Check if database is created completely

Open ribalba opened this issue 10 months ago • 0 comments

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.

  1. write a test that checks if the script runs without errors
  2. put the structure.sql in one transaction
  3. there are more.... to discuss in person on a Tuesday

ribalba avatar Oct 01 '23 11:10 ribalba