From 58692e2ee8a33c587c8c81f7f5700912f2be1721 Mon Sep 17 00:00:00 2001 From: "Amber Chen (Centific Technologies Inc)" Date: Tue, 23 Dec 2025 14:44:20 -0800 Subject: [PATCH 1/3] updated conftest for conversations --- .../tests/conftest.py | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/conftest.py b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/conftest.py index 2eee1ac4747d..22655355fd9c 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/conftest.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/conftest.py @@ -1,9 +1,23 @@ import pytest +from devtools_testutils import EnvironmentVariableLoader +# Environment variable keys +ENV_ENDPOINT = "CONVERSATIONS_ENDPOINT" +ENV_KEY = "CONVERSATIONS_KEY" -# autouse=True will trigger this fixture on each pytest run, even if it's not explicitly used by a test method +@pytest.fixture(scope="session") +def conversations_endpoint(environment_variables: EnvironmentVariableLoader) -> str: + """Endpoint for Conversations tests.""" + return environment_variables.get(ENV_ENDPOINT) + +@pytest.fixture(scope="session") +def conversations_key(environment_variables: EnvironmentVariableLoader) -> str: + """API key for Conversations tests.""" + return environment_variables.get(ENV_KEY) + +# autouse=True will trigger this fixture on each pytest run # test_proxy auto-starts the test proxy -# patch_sleep and patch_async_sleep streamline tests by disabling wait times during LRO polling +# patch_sleep and patch_async_sleep remove wait times during polling @pytest.fixture(scope="session", autouse=True) def start_proxy(test_proxy, patch_sleep, patch_async_sleep): - return + return \ No newline at end of file From c90dea09bb26f50f2d15e09ca60778084dd9661d Mon Sep 17 00:00:00 2001 From: "Amber Chen (Centific Technologies Inc)" Date: Fri, 26 Dec 2025 10:12:04 -0800 Subject: [PATCH 2/3] updated conftest for text authoring --- .../tests/conftest.py | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/tests/conftest.py b/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/tests/conftest.py index 2eee1ac4747d..fdc882e5cf09 100644 --- a/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/tests/conftest.py +++ b/sdk/cognitivelanguage/azure-ai-textanalytics-authoring/tests/conftest.py @@ -1,9 +1,23 @@ import pytest +from devtools_testutils import EnvironmentVariableLoader +# Environment variable keys +ENV_ENDPOINT = "AUTHORING_ENDPOINT" +ENV_KEY = "AUTHORING_KEY" -# autouse=True will trigger this fixture on each pytest run, even if it's not explicitly used by a test method +@pytest.fixture(scope="session") +def authoring_endpoint(environment_variables: EnvironmentVariableLoader) -> str: + """Endpoint for Authoring tests.""" + return environment_variables.get(ENV_ENDPOINT) + +@pytest.fixture(scope="session") +def authoring_key(environment_variables: EnvironmentVariableLoader) -> str: + """API key for Authoring tests.""" + return environment_variables.get(ENV_KEY) + +# autouse=True will trigger this fixture on each pytest run # test_proxy auto-starts the test proxy -# patch_sleep and patch_async_sleep streamline tests by disabling wait times during LRO polling +# patch_sleep and patch_async_sleep remove wait times during polling @pytest.fixture(scope="session", autouse=True) def start_proxy(test_proxy, patch_sleep, patch_async_sleep): - return + return \ No newline at end of file From 27b50f8ff5c1c1b9cd859492c491aeddcde39abe Mon Sep 17 00:00:00 2001 From: "Amber Chen (Centific Technologies Inc)" Date: Tue, 30 Dec 2025 23:04:24 -0800 Subject: [PATCH 3/3] added configuration in tests.yml --- sdk/cognitivelanguage/tests.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sdk/cognitivelanguage/tests.yml b/sdk/cognitivelanguage/tests.yml index 311ea8717e4f..2897c601cc6d 100644 --- a/sdk/cognitivelanguage/tests.yml +++ b/sdk/cognitivelanguage/tests.yml @@ -18,6 +18,12 @@ extends: AZURE_CONVERSATIONS_DEPLOYMENT_NAME: $(clu-project-deployment) AZURE_CONVERSATIONS_WORKFLOW_PROJECT_NAME: $(clu-workflow-project) AZURE_CONVERSATIONS_WORKFLOW_DEPLOYMENT_NAME: $(clu-workflow-project-deployment) + CONVERSATIONS_ENDPOINT: $(clu-uri) + CONVERSATIONS_KEY: $(clu-key) + AUTHORING_ENDPOINT: $(clu-uri) + AUTHORING_KEY: $(clu-key) + TEXT_ANALYSIS_ENDPOINT: $(ta-uri) + TEXT_ANALYSIS_KEY: $(ta-key) AZURE_SUBSCRIPTION_ID: $(COGNITIVELANGUAGE_SUBSCRIPTION_ID) TEST_MODE: "RunLiveNoRecord" # use when allowing preparers to create the rgs for you AZURE_TEST_RUN_LIVE: 'true'