Skip to content

Commit dfc4c9f

Browse files
committed
test: Verify db is empty before triggering the e2e workflow
1 parent 867dc17 commit dfc4c9f

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

scripts/test-e2e.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export GITHUB_WEBHOOK_SECRET="It's a Secret to Everybody"
2222
# Use mock server unless OPENAI_API_KEY is already set
2323
if [[ -z "${OPENAI_API_KEY:-}" ]]; then
2424
echo "OPENAI_API_KEY not set, using mock OpenAI server"
25-
25+
2626
# Start mock OpenAI server
2727
python3 ./scripts/mock-openai-server.py $MOCK_OPENAI_PORT &
2828
MOCK_PID=$!
@@ -108,6 +108,13 @@ while ! obelisk component list 2>/dev/null; do
108108
sleep 1
109109
done
110110

111+
# Make sure this repo has no stars
112+
JSON=$(curl --fail "http://127.0.0.1:9090?repo=${STAR_ACCOUNT}/${STAR_REPO}&ordering=asc&limit=1")
113+
if [[ "$JSON" != "[]" ]]; then
114+
echo "The repo ${STAR_ACCOUNT}/${STAR_REPO} already has star gazers"
115+
exit 1
116+
fi
117+
111118
PAYLOAD='{
112119
"action": "created",
113120
"sender": {

0 commit comments

Comments
 (0)