@@ -68,7 +68,7 @@ describe('Default Processing Database', () => {
|
||||
await db<DbRefreshStateRow>('refresh_state').insert(ref);
|
||||
};
|
||||
|
||||
const insertRefreshKeysRow = async (db: Knex, ref) => {
|
||||
const insertRefreshKeysRow = async (db: Knex, ref: DbRefreshKeysRow) => {
|
||||
await db('refresh_keys').insert(ref);
|
||||
};
|
||||
|
||||
@@ -1432,7 +1432,7 @@ describe('Default Processing Database', () => {
|
||||
async databaseId => {
|
||||
const { knex, db } = await createDatabase(databaseId);
|
||||
|
||||
await knex<DbRefreshKeysRow>('refresh_keys').insert({
|
||||
await insertRefreshKeysRow(knex, {
|
||||
entity_ref: 'location:default/root-1',
|
||||
key: 'foo',
|
||||
});
|
||||
|
||||
+2
@@ -1 +1,3 @@
|
||||
kind: Component
|
||||
metadata:
|
||||
name: component-test
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
kind: API
|
||||
metadata:
|
||||
name: api-test
|
||||
|
||||
@@ -22,6 +22,7 @@ import { AuthorizedRefreshService } from './AuthorizedRefreshService';
|
||||
describe('AuthorizedRefreshService', () => {
|
||||
const refreshService = {
|
||||
refresh: jest.fn(),
|
||||
refreshByRefreshKey: jest.fn(),
|
||||
};
|
||||
const permissionApi = {
|
||||
authorize: jest.fn(),
|
||||
|
||||
@@ -48,6 +48,7 @@ describe('DefaultLocationServiceTest', () => {
|
||||
name: 'foo',
|
||||
},
|
||||
},
|
||||
refreshKeys: [],
|
||||
deferredEntities: [
|
||||
{
|
||||
entity: {
|
||||
@@ -75,6 +76,7 @@ describe('DefaultLocationServiceTest', () => {
|
||||
},
|
||||
},
|
||||
deferredEntities: [],
|
||||
refreshKeys: [],
|
||||
relations: [],
|
||||
errors: [],
|
||||
});
|
||||
@@ -134,6 +136,7 @@ describe('DefaultLocationServiceTest', () => {
|
||||
},
|
||||
},
|
||||
deferredEntities: [],
|
||||
refreshKeys: [],
|
||||
relations: [],
|
||||
errors: [],
|
||||
});
|
||||
@@ -161,6 +164,7 @@ describe('DefaultLocationServiceTest', () => {
|
||||
name: 'foo',
|
||||
},
|
||||
},
|
||||
refreshKeys: [],
|
||||
deferredEntities: [
|
||||
{
|
||||
entity: {
|
||||
@@ -188,6 +192,7 @@ describe('DefaultLocationServiceTest', () => {
|
||||
},
|
||||
},
|
||||
deferredEntities: [],
|
||||
refreshKeys: [],
|
||||
relations: [],
|
||||
errors: [],
|
||||
});
|
||||
@@ -211,6 +216,7 @@ describe('DefaultLocationServiceTest', () => {
|
||||
name: 'bar',
|
||||
},
|
||||
},
|
||||
refreshKeys: [],
|
||||
deferredEntities: [],
|
||||
relations: [],
|
||||
errors: [],
|
||||
|
||||
@@ -57,7 +57,7 @@ describe('createRouter readonly disabled', () => {
|
||||
listLocations: jest.fn(),
|
||||
deleteLocation: jest.fn(),
|
||||
};
|
||||
refreshService = { refresh: jest.fn() };
|
||||
refreshService = { refresh: jest.fn(), refreshByRefreshKey: jest.fn() };
|
||||
orchestrator = { process: jest.fn() };
|
||||
const router = await createRouter({
|
||||
entitiesCatalog,
|
||||
@@ -409,6 +409,7 @@ describe('createRouter readonly disabled', () => {
|
||||
state: {},
|
||||
completedEntity: entity,
|
||||
deferredEntities: [],
|
||||
refreshKeys: [],
|
||||
relations: [],
|
||||
errors: [],
|
||||
});
|
||||
@@ -711,7 +712,7 @@ describe('NextRouter permissioning', () => {
|
||||
listLocations: jest.fn(),
|
||||
deleteLocation: jest.fn(),
|
||||
};
|
||||
refreshService = { refresh: jest.fn() };
|
||||
refreshService = { refresh: jest.fn(), refreshByRefreshKey: jest.fn() };
|
||||
const router = await createRouter({
|
||||
entitiesCatalog,
|
||||
locationService,
|
||||
|
||||
Reference in New Issue
Block a user