Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/components/dashboard/scripts/run-integration-tests.sh
2498 views
1
#!/bin/bash
2
# Copyright (c) 2022 Gitpod GmbH. All rights reserved.
3
# Licensed under the GNU Affero General Public License (AGPL).
4
# See License.AGPL.txt in the project root for license information.
5
6
7
wait_port() {
8
local RC=1;
9
while [ $RC -ne 0 ]; do
10
curl -s --max-time "$1" "$2" > /dev/null;
11
RC=$?;
12
done
13
}
14
15
trap "exit" INT TERM SIGINT SIGTERM
16
trap "kill 0" EXIT
17
18
# start dashboard in background
19
yarn start &
20
21
# wait for the dashboard to become available
22
echo "waiting 60s for localhost:3000 to open..."
23
wait_port 60 localhost:3000
24
echo "localhost:3000 responded, running tests."
25
26
# run actual tests
27
yarn test:integration:run
28
29