backend-test-utils: add missing mock methods
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
This commit is contained in:
@@ -36,6 +36,7 @@ import {
|
||||
UserTokenPayload,
|
||||
ServiceTokenPayload,
|
||||
} from './mockCredentials';
|
||||
import { JsonObject } from '@backstage/types';
|
||||
|
||||
/** @internal */
|
||||
export class MockAuthService implements AuthService {
|
||||
@@ -184,4 +185,8 @@ export class MockAuthService implements AuthService {
|
||||
expiresAt: new Date(Date.now() + 3600_000),
|
||||
};
|
||||
}
|
||||
|
||||
listPublicServiceKeys(): Promise<{ keys: JsonObject[] }> {
|
||||
throw new Error('Not implemented');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,6 +207,7 @@ export namespace mockServices {
|
||||
isPrincipal: jest.fn() as any,
|
||||
getPluginRequestToken: jest.fn(),
|
||||
getLimitedUserToken: jest.fn(),
|
||||
listPublicServiceKeys: jest.fn(),
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user