Skip to content

Commit 5df40cc

Browse files
robxhasura-bot
authored andcommitted
multitenant tests: reduce reliance on env vars, use fake cabal run
There's two major parts to this change: 1. cut down on environment variables needed to run the tests: - lux parameters that don't change are now in code - most remaining parameters have reasonable defaults - the only variable that is still required to be set is HASURA_MULTITENANT_SPEC_DB_URL - env.sh is no longer needed 2. find a better work-around for the problems running graphql-engine-multitenant via cabal run (haskell/cabal#7914), by adding a shell script that implements a more correct version of cabal run. PR-URL: hasura/graphql-engine-mono#3461 GitOrigin-RevId: 0939a79cc45cd3c1c103719552b12099678850dd
1 parent 63f1a93 commit 5df40cc

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

cabal.project.freeze

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ constraints: any.Cabal ==3.2.0.0,
132132
any.ekg-wai ==0.1.0.3,
133133
any.entropy ==0.4.1.6,
134134
entropy -halvm,
135-
any.envy ==2.1.0.0,
136135
any.erf ==2.0.0.0,
137136
any.errors ==2.3.0,
138137
any.exceptions ==0.10.4,

scripts/cabal-run.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env bash
2+
3+
# cabal-run.sh target args
4+
#
5+
# is equivalent to
6+
#
7+
# cabal run target --args
8+
#
9+
# except that killing it will also kill the target.
10+
#
11+
# https://github.com/haskell/cabal/issues/7914
12+
13+
set -euo pipefail
14+
15+
target="$1"
16+
shift
17+
18+
echo "building target: ${target}"
19+
cabal build "$target"
20+
21+
executable=$(cabal list-bin "$target")
22+
23+
exec "$executable" "$@"

0 commit comments

Comments
 (0)