diff --git a/sdk/eventhub/event-hubs/karma.conf.js b/sdk/eventhub/event-hubs/karma.conf.js index c32bd5658aca..60d29d15ef04 100644 --- a/sdk/eventhub/event-hubs/karma.conf.js +++ b/sdk/eventhub/event-hubs/karma.conf.js @@ -47,7 +47,7 @@ module.exports = function(config) { // inject following environment values into browser testing with window.__env__ // environment values MUST be exported or set with same console running "karma start" // https://www.npmjs.com/package/karma-env-preprocessor - envPreprocessor: ["EVENTHUB_CONNECTION_STRING_BROWSER", "EVENTHUB_NAME", "IOTHUB_CONNECTION_STRING_BROWSER"], + envPreprocessor: ["EVENTHUB_CONNECTION_STRING_BROWSER", "EVENTHUB_NAME", "IOTHUB_EH_COMPATIBLE_CONNECTION_STRING_BROWSER"], // test results reporter to use // possible values: 'dots', 'progress' diff --git a/sdk/eventhub/event-hubs/samples/sample.env b/sdk/eventhub/event-hubs/samples/sample.env index f63b3f16055f..5ec8995cb3ca 100644 --- a/sdk/eventhub/event-hubs/samples/sample.env +++ b/sdk/eventhub/event-hubs/samples/sample.env @@ -8,7 +8,7 @@ CONSUMER_GROUP_NAME= STORAGE_CONTAINER_NAME= # Used in the useWithIotHub.ts sample -IOTHUB_CONNECTION_STRING= +IOTHUB_EH_COMPATIBLE_CONNECTION_STRING= # Used in the usingAadAuth.ts sample # Setup : diff --git a/sdk/eventhub/event-hubs/samples/useWithIotHub.ts b/sdk/eventhub/event-hubs/samples/useWithIotHub.ts index 184b2c8b3161..2d5693f203ac 100644 --- a/sdk/eventhub/event-hubs/samples/useWithIotHub.ts +++ b/sdk/eventhub/event-hubs/samples/useWithIotHub.ts @@ -10,7 +10,7 @@ import { EventHubConsumerClient } from "@azure/event-hubs"; // Define IoT Hub Event Hubs-compatible connection string here. // To find the correct connection string to use, visit: // https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-messages-read-builtin -const connectionString = process.env["IOTHUB_CONNECTION_STRING"] || ""; +const connectionString = process.env["IOTHUB_EH_COMPATIBLE_CONNECTION_STRING"] || ""; const consumerGroup = process.env["CONSUMER_GROUP_NAME"] || ""; export async function main(): Promise { diff --git a/sdk/eventhub/event-hubs/test/iothub.spec.ts b/sdk/eventhub/event-hubs/test/iothub.spec.ts index 52c09913fdba..4bef59f05f0b 100644 --- a/sdk/eventhub/event-hubs/test/iothub.spec.ts +++ b/sdk/eventhub/event-hubs/test/iothub.spec.ts @@ -14,13 +14,13 @@ const env = getEnvVars(); describe("EventHub Client with iothub connection string #RunnableInBrowser", function(): void { const service = { - connectionString: (env[EnvVarKeys.IOTHUB_CONNECTION_STRING] as string) || "" + connectionString: (env[EnvVarKeys.IOTHUB_EH_COMPATIBLE_CONNECTION_STRING] as string) || "" }; let client: EventHubClient; before("validate environment", async function(): Promise { should.exist( - env[EnvVarKeys.IOTHUB_CONNECTION_STRING], - "define IOTHUB_CONNECTION_STRING in your environment before running integration tests." + env[EnvVarKeys.IOTHUB_EH_COMPATIBLE_CONNECTION_STRING], + "define IOTHUB_EH_COMPATIBLE_CONNECTION_STRING in your environment before running integration tests." ); }); diff --git a/sdk/eventhub/event-hubs/test/utils/testUtils.ts b/sdk/eventhub/event-hubs/test/utils/testUtils.ts index f365502bd27a..a62f2f8638f8 100644 --- a/sdk/eventhub/event-hubs/test/utils/testUtils.ts +++ b/sdk/eventhub/event-hubs/test/utils/testUtils.ts @@ -12,7 +12,7 @@ export const isNode = export enum EnvVarKeys { EVENTHUB_CONNECTION_STRING = "EVENTHUB_CONNECTION_STRING", EVENTHUB_NAME = "EVENTHUB_NAME", - IOTHUB_CONNECTION_STRING = "IOTHUB_CONNECTION_STRING", + IOTHUB_EH_COMPATIBLE_CONNECTION_STRING = "IOTHUB_EH_COMPATIBLE_CONNECTION_STRING", AZURE_TENANT_ID = "AZURE_TENANT_ID", AZURE_CLIENT_ID = "AZURE_CLIENT_ID", AZURE_CLIENT_SECRET = "AZURE_CLIENT_SECRET" @@ -35,8 +35,8 @@ export function getEnvVars(): { [key in EnvVarKeys]: any } { !isNode ), [EnvVarKeys.EVENTHUB_NAME]: getEnvVarValue(EnvVarKeys.EVENTHUB_NAME), - [EnvVarKeys.IOTHUB_CONNECTION_STRING]: getEnvVarValue( - EnvVarKeys.IOTHUB_CONNECTION_STRING, + [EnvVarKeys.IOTHUB_EH_COMPATIBLE_CONNECTION_STRING]: getEnvVarValue( + EnvVarKeys.IOTHUB_EH_COMPATIBLE_CONNECTION_STRING, !isNode ), [EnvVarKeys.AZURE_TENANT_ID]: getEnvVarValue(EnvVarKeys.AZURE_TENANT_ID), diff --git a/sdk/eventhub/event-hubs/tests.yml b/sdk/eventhub/event-hubs/tests.yml index 2ebf86769d8b..135ce134bea6 100644 --- a/sdk/eventhub/event-hubs/tests.yml +++ b/sdk/eventhub/event-hubs/tests.yml @@ -69,7 +69,7 @@ jobs: AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) - IOTHUB_CONNECTION_STRING: $(js-event-hubs-test-iothub-connection-string) + IOTHUB_EH_COMPATIBLE_CONNECTION_STRING: $(js-event-hubs-test-iothub-connection-string) EVENTHUB_CONNECTION_STRING: $(js-event-hubs-test-connection-string) - IOTHUB_CONNECTION_STRING_BROWSER: $(js-event-hubs-test-browser-iothub-connection-string) + IOTHUB_EH_COMPATIBLE_CONNECTION_STRING_BROWSER: $(js-event-hubs-test-browser-iothub-connection-string) EVENTHUB_CONNECTION_STRING_BROWSER: $(js-event-hubs-test-browser-connection-string)