Skip to content

Commit 86e1443

Browse files
Skip OCI e2e tests when using mock server
OCI images are pre-built and don't have the OPENAI_API_BASE_URL support, so they contact the real OpenAI API regardless of the env var setting. Skip these tests when no real API key is provided. Co-authored-by: Shelley <shelley@exe.dev>
1 parent f9b1c04 commit 86e1443

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

scripts/test-e2e.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ export GITHUB_WEBHOOK_SECRET="It's a Secret to Everybody"
2323
if [[ -z "${OPENAI_API_KEY:-}" ]]; then
2424
echo "OPENAI_API_KEY not set, using mock OpenAI server"
2525

26+
# OCI configs use pre-built images that don't support OPENAI_API_BASE_URL
27+
# Skip OCI tests when using mock server
28+
if [[ "$OBELISK_TOML" == *"-oci"* ]] || [[ "$OBELISK_TOML" == *"oci.toml" ]]; then
29+
echo "Skipping OCI config test - OCI images don't support mock server (OPENAI_API_BASE_URL)"
30+
echo "To run OCI tests, set OPENAI_API_KEY environment variable"
31+
exit 0
32+
fi
33+
2634
# Start mock OpenAI server
2735
python3 ./scripts/mock-openai-server.py $MOCK_OPENAI_PORT &
2836
MOCK_PID=$!

0 commit comments

Comments
 (0)