Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests fail if played more than once #223

Open
lbartoletti opened this issue Feb 12, 2018 · 5 comments
Open

Tests fail if played more than once #223

lbartoletti opened this issue Feb 12, 2018 · 5 comments

Comments

@lbartoletti
Copy link
Collaborator

First time

⇒  ./tests/tests.sh
PUM version: pum version 0.5.9

CREATE EXTENSION
CREATE EXTENSION
ERROR:  schema "qwat_sys" already exists
/home/Loic/prog/Oslandia/data-model
Running test_add_node.sql ... OK
Running test_node_orientation.sql ... OK
Running test_valve_orientation.sql ... OK
Running test_altitude.sql ... OK
Running test_alternative_geometry.sql ... OK
Running test_move_node_end_pipe.sql ... OK
Running test_scenarii.sql ... OK

Second time

⇒  ./tests/tests.sh
PUM version: pum version 0.5.9

CREATE EXTENSION
CREATE EXTENSION
ERROR:  schema "qwat_sys" already exists
/XXX/data-model
Running test_add_node.sql ... Error
--- /tmp/test_add_node.sql.txt  2018-02-12 14:37:17.781147000 +0100
+++ /XXX/data-model/tests/test_add_node.expected.sql       2018-02-12 14:29:13.479946000 +0100
@@ -1,6 +1,5 @@
 INSERT 0 1
-psql:/XXX/data-model/tests/test_add_node.sql:5: ERROR:  duplicate key value violates unique constraint "district_pkey"
-DÉTAIL : Key (id)=(1) already exists.
+INSERT 0 1
 INSERT 0 1
 INSERT 0 1
 INSERT 0 1
OK
Running test_node_orientation.sql ... OK
Running test_valve_orientation.sql ... OK
Running test_altitude.sql ... OK
Running test_alternative_geometry.sql ... OK
Running test_move_node_end_pipe.sql ... OK
Running test_scenarii.sql ... Error
--- /tmp/test_scenarii.sql.txt  2018-02-12 14:37:19.162414000 +0100
+++ /XXX/data-model/tests/test_scenarii.expected.sql       2018-02-12 14:29:13.480751000 +0100
@@ -8,8 +8,7 @@
 UPDATE 1
 INSERT 0 1
 INSERT 0 1
-psql:/XXX/data-model/tests/test_scenarii.sql:49: ERROR:  duplicate key value violates unique constraint "vl_part_type_pk"
-DÉTAIL : Key (id)=(999) already exists.
+INSERT 0 1
 INSERT 0 1
 INSERT 0 1
 INSERT 0 1
OK
@sylvainbeo
Copy link
Collaborator

Yes. This is related to opengisch/pum#12

@sylvainbeo
Copy link
Collaborator

We need to add the DROP and CREATE in the tests script

@ponceta
Copy link
Member

ponceta commented Feb 23, 2018

That's one of the reasons I asked to include CREATE and DROP mechanisms into PUM.

opengisch/pum#16

@sylvainbeo
Copy link
Collaborator

@ponceta The DB are not created by PUM, so it should not be PUM to drop these.

@ponceta
Copy link
Member

ponceta commented Apr 13, 2018

@sylvainbeo I agree on that point, what is it not created by PUM should not be dropped by PUM. But qwat_test and qwat_comp are PUM required DBs which are created manually or by external scripting.

pum does not work without these two db...

(pum evol -> opengisch/pum#25)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants