A fast and simple blog backend.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
mediocre-blog/test.sh

23 lines
605 B

test_dir="$(mktemp -d)"
mkdir -p "$test_dir"/run
mkdir -p "$test_dir"/data
test_cfg="(import ./config.nix) // {
runDir=\"${test_dir}/run\";
dataDir=\"${test_dir}/data\";
}"
$(nix-build --no-out-link -A entrypoint \
--arg baseConfig "$test_cfg" \
--arg baseSkipServices '["srv" "static"]') &
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.
nix-shell -A srv.test \
--arg baseConfig "$test_cfg" \
--run "cd srv/src && go test ./... -count=1 -tags integration"