Skip to content

Commit 821e7f8

Browse files
authored
Removed old APIs (#81)
* Removed old APIs Signed-off-by: nithinkdb <nithin.krishnamurthi@databricks.com> * Removed old tests Signed-off-by: nithinkdb <nithin.krishnamurthi@databricks.com> Signed-off-by: nithinkdb <nithin.krishnamurthi@databricks.com>
1 parent 4186df2 commit 821e7f8

3 files changed

Lines changed: 0 additions & 113 deletions

File tree

lib/DBSQLSession.ts

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -265,65 +265,6 @@ export default class DBSQLSession implements IDBSQLSession {
265265
.then((response) => this.createOperation(response));
266266
}
267267

268-
/**
269-
* Get delegation token. For kerberos auth only
270-
* @public
271-
* @param owner
272-
* @param renewer
273-
* @returns Delegation token
274-
*/
275-
getDelegationToken(owner: string, renewer: string): Promise<string> {
276-
return this.driver
277-
.getDelegationToken({
278-
sessionHandle: this.sessionHandle,
279-
owner,
280-
renewer,
281-
})
282-
.then((response) => {
283-
this.assertStatus(response.status);
284-
285-
return response.delegationToken || '';
286-
});
287-
}
288-
289-
/**
290-
* Renew delegation token/ For kerberos auth only
291-
* @public
292-
* @param token
293-
* @returns Operation status
294-
*/
295-
renewDelegationToken(token: string): Promise<Status> {
296-
return this.driver
297-
.renewDelegationToken({
298-
sessionHandle: this.sessionHandle,
299-
delegationToken: token,
300-
})
301-
.then((response) => {
302-
this.assertStatus(response.status);
303-
304-
return this.statusFactory.create(response.status);
305-
});
306-
}
307-
308-
/**
309-
* Cancel delegation token. For kerberos auth only
310-
* @public
311-
* @param token
312-
* @returns Operation status
313-
*/
314-
cancelDelegationToken(token: string): Promise<Status> {
315-
return this.driver
316-
.cancelDelegationToken({
317-
sessionHandle: this.sessionHandle,
318-
delegationToken: token,
319-
})
320-
.then((response) => {
321-
this.assertStatus(response.status);
322-
323-
return this.statusFactory.create(response.status);
324-
});
325-
}
326-
327268
/**
328269
* Closes the session
329270
* @public

lib/contracts/IDBSQLSession.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -154,26 +154,6 @@ export default interface IDBSQLSession {
154154
*/
155155
getCrossReference(request: CrossReferenceRequest): Promise<IOperation>;
156156

157-
/**
158-
* Get delegation token. For kerberos auth only
159-
*
160-
* @param owner
161-
* @param renewer
162-
*/
163-
getDelegationToken(owner: string, renewer: string): Promise<string>;
164-
165-
/**
166-
* Renew delegation token/ For kerberos auth only
167-
* @param token
168-
*/
169-
renewDelegationToken(token: string): Promise<Status>;
170-
171-
/**
172-
* Cancel delegation token. For kerberos auth only
173-
* @param token
174-
*/
175-
cancelDelegationToken(token: string): Promise<Status>;
176-
177157
/**
178158
* closes the session
179159
*/

tests/unit/DBSQLSession.test.js

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -333,40 +333,6 @@ describe('DBSQLSession', () => {
333333
});
334334
});
335335

336-
describe('getDelegationToken', () => {
337-
it('should return token if available', async () => {
338-
const session = createSession((unused, resp) => ({
339-
...resp,
340-
delegationToken: 'token',
341-
}));
342-
343-
const result = await session.getDelegationToken('owner', 'renewer');
344-
expect(result).to.be.eq('token');
345-
});
346-
347-
it('should return empty string if token is not available', async () => {
348-
const session = createSession();
349-
const result = await session.getDelegationToken('owner', 'renewer');
350-
expect(result).to.be.eq('');
351-
});
352-
});
353-
354-
describe('renewDelegationToken', () => {
355-
it('should run operation', async () => {
356-
const session = createSession();
357-
const result = await session.renewDelegationToken('token');
358-
expect(result).instanceOf(Status);
359-
});
360-
});
361-
362-
describe('cancelDelegationToken', () => {
363-
it('should run operation', async () => {
364-
const session = createSession();
365-
const result = await session.cancelDelegationToken('token');
366-
expect(result).instanceOf(Status);
367-
});
368-
});
369-
370336
describe('close', () => {
371337
it('should run operation', async () => {
372338
const session = createSession(() => ({

0 commit comments

Comments
 (0)