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
9 changes: 6 additions & 3 deletions sdk/eventhub/event-hubs/test/client.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,15 @@ describe("Create EventHubClient #RunnableInBrowser", function(): void {
"define AZURE_CLIENT_SECRET in your environment before running integration tests."
);
should.exist(
env[EnvVarKeys.ENDPOINT],
"define ENDPOINT in your environment before running integration tests."
env[EnvVarKeys.EVENTHUB_CONNECTION_STRING],
"define EVENTHUB_CONNECTION_STRING in your environment before running integration tests."
);

// This is of the form <your-namespace>.servicebus.windows.net
const endpoint = (env.EVENTHUB_CONNECTION_STRING.match("Endpoint=sb://(.*)/;") || "")[1];

const credential = new EnvironmentCredential();
const client = new EventHubClient(env.ENDPOINT, env.EVENTHUB_NAME, credential);
const client = new EventHubClient(endpoint, env.EVENTHUB_NAME, credential);

// Extra check involving actual call to the service to ensure this works
const hubInfo = await client.getProperties();
Expand Down
2 changes: 0 additions & 2 deletions sdk/eventhub/event-hubs/test/utils/testUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export enum EnvVarKeys {
EVENTHUB_CONNECTION_STRING = "EVENTHUB_CONNECTION_STRING",
EVENTHUB_NAME = "EVENTHUB_NAME",
IOTHUB_CONNECTION_STRING = "IOTHUB_CONNECTION_STRING",
ENDPOINT = "ENDPOINT",
AZURE_TENANT_ID = "AZURE_TENANT_ID",
AZURE_CLIENT_ID = "AZURE_CLIENT_ID",
AZURE_CLIENT_SECRET = "AZURE_CLIENT_SECRET"
Expand All @@ -31,7 +30,6 @@ export function getEnvVars(): { [key in EnvVarKeys]: any } {
[EnvVarKeys.EVENTHUB_CONNECTION_STRING]: getEnvVarValue(EnvVarKeys.EVENTHUB_CONNECTION_STRING),
[EnvVarKeys.EVENTHUB_NAME]: getEnvVarValue(EnvVarKeys.EVENTHUB_NAME),
[EnvVarKeys.IOTHUB_CONNECTION_STRING]: getEnvVarValue(EnvVarKeys.IOTHUB_CONNECTION_STRING),
[EnvVarKeys.ENDPOINT]: getEnvVarValue(EnvVarKeys.ENDPOINT),
[EnvVarKeys.AZURE_TENANT_ID]: getEnvVarValue(EnvVarKeys.AZURE_TENANT_ID),
[EnvVarKeys.AZURE_CLIENT_ID]: getEnvVarValue(EnvVarKeys.AZURE_CLIENT_ID),
[EnvVarKeys.AZURE_CLIENT_SECRET]: getEnvVarValue(EnvVarKeys.AZURE_CLIENT_SECRET)
Expand Down
1 change: 0 additions & 1 deletion sdk/eventhub/event-hubs/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,3 @@ jobs:
AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id)
IOTHUB_CONNECTION_STRING: $(js-event-hubs-test-iothub-connection-string)
EVENTHUB_CONNECTION_STRING: $(js-event-hubs-test-connection-string)
ENDPOINT: $(js-event-hubs-test-endpoint)