Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: Separating integration test local .env #817

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .env_local_example
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
# If you share a .env with a team, you can put personalized secrets in .env.local
###############

# This will override the .env value
OPENAI_CHAT_ENDPOINT=${AZURE_OPENAI_INTEGRATION_TEST_ENDPOINT}
OPENAI_CHAT_KEY=${AZURE_OPENAI_INTEGRATION_TEST_KEY}
# This will override the .env value for your default OpenAIChatTarget
OPENAI_CHAT_ENDPOINT=${PLATFORM_OPENAI_CHAT_ENDPOINT}
OPENAI_CHAT_KEY=${PLATFORM_OPENAI_CHAT_API_KEY}
OPENAI_CHAT_MODEL="gpt-4o"


Expand Down
29 changes: 29 additions & 0 deletions build_scripts/env_local_integration_test
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
###############
# This .env.local file is used for integration tests
###############

# This will override the .env value
OPENAI_CHAT_ENDPOINT=${AZURE_OPENAI_INTEGRATION_TEST_ENDPOINT}
OPENAI_CHAT_KEY=${AZURE_OPENAI_INTEGRATION_TEST_KEY}
OPENAI_CHAT_MODEL="gpt-4o"

OPENAI_DALLE_ENDPOINT=${OPENAI_DALLE_ENDPOINT2}
OPENAI_DALLE_API_KEY=${OPENAI_DALLE_API_KEY2}

OPENAI_TTS_ENDPOINT=${OPENAI_TTS_ENDPOINT2}
OPENAI_TTS_KEY=${OPENAI_TTS_KEY2}

AZURE_SQL_DB_CONNECTION_STRING=${AZURE_SQL_DB_CONNECTION_STRING_TEST}
AZURE_STORAGE_ACCOUNT_DB_DATA_CONTAINER_URL=${AZURE_STORAGE_ACCOUNT_DB_DATA_CONTAINER_URL_TEST}

GLOBAL_MEMORY_LABELS={"username": "integration-test", "op_name": "integration-test"}

##############
# Set optional OPENAI_CHAT_ADDITIONAL_REQUEST_HEADERS to include additional HTTP headers in a dictionary format for API requests, e.g., {'key1': 'value1'}.
# This is set for both Azure OpenAI and OpenAI endpoints
##############
#OPENAI_CHAT_ADDITIONAL_REQUEST_HEADERS="<Provide headers using a dictionary format. Ex., {'key1':'value1'}>"


# Specify to run tests that may be skipped in the pipeline
#RUN_ALL_TESTS="true"
2 changes: 1 addition & 1 deletion integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
PYRIT_TEST_SECRET: $(env-global)
name: create_env_file
- bash: |
cp .env_local_example .env.local
cp build_scripts/env_local_integration_test .env.local
displayName: "Create .env.local from example"
- bash: pip install --upgrade setuptools pip packaging
name: upgrade_pip_and_setuptools_before_installing_PyRIT
Expand Down