Skip to content

Commit 4820b44

Browse files
changes in storybook_test.sh
1 parent f3fbed4 commit 4820b44

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

.buildkite/scripts/steps/storybooks/storybook_tests.sh

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,8 @@ echo "Starting Storybook server..."
88
yarn storybook apm &
99
STORYBOOK_PID=$!
1010

11-
cleanup() {
12-
echo "Killing Storybook server..."
13-
kill "$STORYBOOK_PID"
14-
}
15-
trap cleanup EXIT
16-
1711
echo "Waiting for Storybook to be ready..."
18-
TIMEOUT=60
19-
RETRY_INTERVAL=2
20-
SECONDS_WAITED=0
21-
22-
until curl --silent --fail "$STORYBOOK_URL" > /dev/null; do
23-
if [ "$SECONDS_WAITED" -ge "$TIMEOUT" ]; then
24-
echo "Timed out waiting for Storybook to start"
25-
exit 1
26-
fi
27-
sleep "$RETRY_INTERVAL"
28-
SECONDS_WAITED=$((SECONDS_WAITED + RETRY_INTERVAL))
29-
done
30-
31-
echo "Storybook is ready."
12+
sleep 60
3213

3314
echo "Running Storybook tests..."
3415
yarn test:storybook --url "$STORYBOOK_URL"

0 commit comments

Comments
 (0)