...
1#!/bin/bash
2
3set -euo pipefail
4export GO111MODULE=on
5cd integration
6
7date
8go run ./server/cmd/integration/server.go &
9
10sleep 5
11curl -s --connect-timeout 5 \
12 --max-time 10 \
13 --retry 5 \
14 --retry-delay 5 \
15 --retry-max-time 40 \
16 --retry-connrefused \
17 localhost:8080 > /dev/null
18
19
20echo "### validating introspected schema"
21npm run gen
22
23if ! diff <(tail -n +3 src/generated/schema-expected.graphql) <(tail -n +3 src/generated/schema-fetched.graphql) ; then
24 echo "The expected schema has changed, you need to update schema-expected.graphql with any expected changes"
25 exit 1
26fi
27
28echo "### running integration spec"
29npm run test
View as plain text