diff options
author | Brian Picciano <mediocregopher@gmail.com> | 2022-05-08 16:57:04 -0600 |
---|---|---|
committer | Brian Picciano <mediocregopher@gmail.com> | 2022-05-08 16:57:04 -0600 |
commit | d284fe2d2518c43097c0fea436d2073de14f3ada (patch) | |
tree | f35fd1dd4810bed84d190706076d4b0939e1131c | |
parent | a6269d1fe01b9b5f5438490d0dd6caf8d833c02a (diff) |
Fix integration tests
-rw-r--r-- | test.sh | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -9,14 +9,20 @@ test_cfg="(import ./config.nix) // { dataDir=\"${test_dir}/data\"; }" -$(nix-build --no-out-link -A entrypoint \ +entrypoint=$(nix-build --no-out-link -A entrypoint \ --arg baseConfig "$test_cfg" \ - --arg baseSkipServices '["srv" "static"]') & + --arg skipServices '["srv"]') +$entrypoint & trap "kill $!; wait; rm -rf $test_dir" EXIT -# TODO there's a race condition here, we should wait until redis is definitely -# listening before commencing the tests. +# NOTE this is a bit of a hack... the location of the redis socket's source of +# truth is in default.nix, but it's not clear how to get that from there to +# here, so we reproduce the calculation here. +while [ ! -e $test_dir/run/redis ]; do + echo "waiting for redis unix socket" + sleep 1 +done nix-shell -A srv.test \ --arg baseConfig "$test_cfg" \ |