add test for spec idempotence

This commit is contained in:
monacoremo
2020-12-13 22:13:05 +01:00
committed by Wolfgang Walther
parent 71fa87937b
commit a52c114ff4
3 changed files with 21 additions and 1 deletions
+2
View File
@@ -44,6 +44,8 @@ let
checkedShellScript "postgrest-check"
''
${tests}/bin/postgrest-test-spec-all
${tests}/bin/postgrest-test-spec-idempotence
${tests}/bin/postgrest-test-io
${style}/bin/postgrest-lint
${style}/bin/postgrest-style-check
'';
+15 -1
View File
@@ -24,7 +24,7 @@ let
postgresql:
checkedShellScript "postgrest-test-${postgresql.name}"
''
export PATH=${postgresql}/bin:${git}/bin:${runtimeShell}/bin:"$PATH"
export PATH=${postgresql}/bin:${git}/bin:"$PATH"
exec ${../test/with_tmp_db} "$@"
'';
@@ -58,6 +58,19 @@ let
EOF
'';
testSpecIdempotence =
name: postgrestql:
checkedShellScript
name
''
env="$(cat ${postgrest.env})"
export PATH="$env/bin:$PATH"
${withTmpDb postgresql} ${runtimeShell} -c " \
${cabal-install}/bin/cabal v2-test ${devCabalOptions} && \
${cabal-install}/bin/cabal v2-test ${devCabalOptions}"
'';
# Create a `testSpec` for each PostgreSQL version that we want to test
# against.
testSpecVersions =
@@ -123,6 +136,7 @@ buildEnv
paths =
[
(testSpec "postgrest-test-spec" postgresql).bin
(testSpecIdempotence "postgrest-test-spec-idempotence" postgresql).bin
testSpecAllVersions.bin
(testIO "postgrest-test-io" postgresql).bin
] ++ testSpecVersions;