Skip to content
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
2 changes: 1 addition & 1 deletion sdk/eventhub/event-hubs/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion sdk/eventhub/event-hubs/samples/sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ CONSUMER_GROUP_NAME=<name of a consumer group>
STORAGE_CONTAINER_NAME=<storage account connection string for checkpoints>

# Used in the useWithIotHub.ts sample
IOTHUB_CONNECTION_STRING=<connection string with EntityPath>
IOTHUB_EH_COMPATIBLE_CONNECTION_STRING=<connection string with EntityPath>

# Used in the usingAadAuth.ts sample
# Setup :
Expand Down
2 changes: 1 addition & 1 deletion sdk/eventhub/event-hubs/samples/useWithIotHub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> {
Expand Down
6 changes: 3 additions & 3 deletions sdk/eventhub/event-hubs/test/iothub.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> {
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."
);
});

Expand Down
6 changes: 3 additions & 3 deletions sdk/eventhub/event-hubs/test/utils/testUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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),
Expand Down
4 changes: 2 additions & 2 deletions sdk/eventhub/event-hubs/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)