Skip to content

Commit dadc2af

Browse files
committed
Apply prettier formatting
Auto-fix from `prettier --write` on the two files touched by the previous commit; no logic changes. Co-authored-by: Isaac Signed-off-by: samikshya-chand_data <samikshya.chand@databricks.com>
1 parent 3d21c11 commit dadc2af

2 files changed

Lines changed: 8 additions & 16 deletions

File tree

lib/DBSQLClient.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -377,10 +377,7 @@ export default class DBSQLClient extends EventEmitter implements IDBSQLClient, I
377377
const merged: Record<string, string> = { ...(userHeaders ?? {}) };
378378
const hasOrgIdAlready = Object.keys(merged).some((k) => k.toLowerCase() === 'x-databricks-org-id');
379379
if (hasOrgIdAlready) {
380-
this.logger.log(
381-
LogLevel.debug,
382-
'SPOG: x-databricks-org-id supplied by caller; not extracting from httpPath',
383-
);
380+
this.logger.log(LogLevel.debug, 'SPOG: x-databricks-org-id supplied by caller; not extracting from httpPath');
384381
} else {
385382
const orgId = DBSQLClient.extractWorkspaceId(httpPath);
386383
if (orgId) {

tests/unit/DBSQLClient.test.ts

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -788,27 +788,22 @@ describe('DBSQLClient telemetry paths', () => {
788788
});
789789

790790
it('returns the numeric workspace id from all-purpose cluster path form', () => {
791-
expect(
792-
(DBSQLClient as any).extractWorkspaceId('sql/protocolv1/o/99999999999999/0101-000000-aaaaaaaa'),
793-
).to.equal('99999999999999');
791+
expect((DBSQLClient as any).extractWorkspaceId('sql/protocolv1/o/99999999999999/0101-000000-aaaaaaaa')).to.equal(
792+
'99999999999999',
793+
);
794794
});
795795

796796
it('returns the numeric workspace id from all-purpose cluster path with leading slash', () => {
797-
expect(
798-
(DBSQLClient as any).extractWorkspaceId('/sql/protocolv1/o/12345/0101-000000-aaaaaaaa'),
799-
).to.equal('12345');
797+
expect((DBSQLClient as any).extractWorkspaceId('/sql/protocolv1/o/12345/0101-000000-aaaaaaaa')).to.equal('12345');
800798
});
801799

802800
it('returns undefined when all-purpose cluster path has non-numeric workspace segment', () => {
803-
expect(
804-
(DBSQLClient as any).extractWorkspaceId('sql/protocolv1/o/tenant_xyz/0101-000000-aaaaaaaa'),
805-
).to.be.undefined;
801+
expect((DBSQLClient as any).extractWorkspaceId('sql/protocolv1/o/tenant_xyz/0101-000000-aaaaaaaa')).to.be
802+
.undefined;
806803
});
807804

808805
it('prefers ?o= query form over /o/ path form when both are present', () => {
809-
expect(
810-
(DBSQLClient as any).extractWorkspaceId('sql/protocolv1/o/111/cluster?o=222'),
811-
).to.equal('222');
806+
expect((DBSQLClient as any).extractWorkspaceId('sql/protocolv1/o/111/cluster?o=222')).to.equal('222');
812807
});
813808
});
814809

0 commit comments

Comments
 (0)