@@ -100,6 +100,7 @@ describe('AwsS3EntityProvider', () => {
|
||||
const schedule = new PersistingTaskRunner();
|
||||
const entityProviderConnection: EntityProviderConnection = {
|
||||
applyMutation: jest.fn(),
|
||||
refresh: jest.fn(),
|
||||
};
|
||||
|
||||
const provider = AwsS3EntityProvider.fromConfig(config, {
|
||||
|
||||
@@ -71,6 +71,7 @@ describe('AzureDevOpsEntityProvider', () => {
|
||||
const schedule = new PersistingTaskRunner();
|
||||
const entityProviderConnection: EntityProviderConnection = {
|
||||
applyMutation: jest.fn(),
|
||||
refresh: jest.fn(),
|
||||
};
|
||||
|
||||
const provider = AzureDevOpsEntityProvider.fromConfig(config, {
|
||||
|
||||
+1
@@ -127,6 +127,7 @@ describe('BitbucketCloudEntityProvider', () => {
|
||||
const schedule = new PersistingTaskRunner();
|
||||
const entityProviderConnection: EntityProviderConnection = {
|
||||
applyMutation: jest.fn(),
|
||||
refresh: jest.fn(),
|
||||
};
|
||||
const provider = BitbucketCloudEntityProvider.fromConfig(config, {
|
||||
logger,
|
||||
|
||||
+2
@@ -221,6 +221,7 @@ describe('BitbucketServerEntityProvider', () => {
|
||||
const schedule = new PersistingTaskRunner();
|
||||
const entityProviderConnection: EntityProviderConnection = {
|
||||
applyMutation: jest.fn(),
|
||||
refresh: jest.fn(),
|
||||
};
|
||||
const provider = BitbucketServerEntityProvider.fromConfig(config, {
|
||||
logger,
|
||||
@@ -296,6 +297,7 @@ describe('BitbucketServerEntityProvider', () => {
|
||||
const schedule = new PersistingTaskRunner();
|
||||
const entityProviderConnection: EntityProviderConnection = {
|
||||
applyMutation: jest.fn(),
|
||||
refresh: jest.fn(),
|
||||
};
|
||||
const provider = BitbucketServerEntityProvider.fromConfig(config, {
|
||||
logger,
|
||||
|
||||
@@ -83,6 +83,7 @@ describe('GerritEntityProvider', () => {
|
||||
|
||||
const entityProviderConnection: EntityProviderConnection = {
|
||||
applyMutation: jest.fn(),
|
||||
refresh: jest.fn(),
|
||||
};
|
||||
|
||||
it('discovers projects from the api.', async () => {
|
||||
|
||||
@@ -146,6 +146,7 @@ describe('GitHubEntityProvider', () => {
|
||||
const schedule = new PersistingTaskRunner();
|
||||
const entityProviderConnection: EntityProviderConnection = {
|
||||
applyMutation: jest.fn(),
|
||||
refresh: jest.fn(),
|
||||
};
|
||||
|
||||
const provider = GitHubEntityProvider.fromConfig(config, {
|
||||
@@ -233,6 +234,7 @@ describe('GitHubEntityProvider', () => {
|
||||
const schedule = new PersistingTaskRunner();
|
||||
const entityProviderConnection: EntityProviderConnection = {
|
||||
applyMutation: jest.fn(),
|
||||
refresh: jest.fn(),
|
||||
};
|
||||
|
||||
const provider = GitHubEntityProvider.fromConfig(config, {
|
||||
@@ -306,6 +308,7 @@ describe('GitHubEntityProvider', () => {
|
||||
const schedule = new PersistingTaskRunner();
|
||||
const entityProviderConnection: EntityProviderConnection = {
|
||||
applyMutation: jest.fn(),
|
||||
refresh: jest.fn(),
|
||||
};
|
||||
|
||||
const provider = GitHubEntityProvider.fromConfig(config, {
|
||||
@@ -404,6 +407,7 @@ it('apply full update on scheduled execution with topic exclusion taking priorit
|
||||
const schedule = new PersistingTaskRunner();
|
||||
const entityProviderConnection: EntityProviderConnection = {
|
||||
applyMutation: jest.fn(),
|
||||
refresh: jest.fn(),
|
||||
};
|
||||
|
||||
const provider = GitHubEntityProvider.fromConfig(config, {
|
||||
|
||||
@@ -83,6 +83,7 @@ describe('GitHubOrgEntityProvider', () => {
|
||||
|
||||
const entityProviderConnection: EntityProviderConnection = {
|
||||
applyMutation: jest.fn(),
|
||||
refresh: jest.fn(),
|
||||
};
|
||||
|
||||
const logger = getVoidLogger();
|
||||
|
||||
+2
@@ -155,6 +155,7 @@ describe('GitlabDiscoveryEntityProvider', () => {
|
||||
const schedule = new PersistingTaskRunner();
|
||||
const entityProviderConnection: EntityProviderConnection = {
|
||||
applyMutation: jest.fn(),
|
||||
refresh: jest.fn(),
|
||||
};
|
||||
const provider = GitlabDiscoveryEntityProvider.fromConfig(config, {
|
||||
logger,
|
||||
@@ -253,6 +254,7 @@ describe('GitlabDiscoveryEntityProvider', () => {
|
||||
const schedule = new PersistingTaskRunner();
|
||||
const entityProviderConnection: EntityProviderConnection = {
|
||||
applyMutation: jest.fn(),
|
||||
refresh: jest.fn(),
|
||||
};
|
||||
const provider = GitlabDiscoveryEntityProvider.fromConfig(config, {
|
||||
logger,
|
||||
|
||||
+1
@@ -95,6 +95,7 @@ describe('MicrosoftGraphOrgEntityProvider', () => {
|
||||
};
|
||||
const entityProviderConnection: EntityProviderConnection = {
|
||||
applyMutation: jest.fn(),
|
||||
refresh: jest.fn(),
|
||||
};
|
||||
const provider = MicrosoftGraphOrgEntityProvider.fromConfig(
|
||||
new ConfigReader(config),
|
||||
|
||||
@@ -26,7 +26,7 @@ describe('DefaultLocationStore', () => {
|
||||
async function createLocationStore(databaseId: TestDatabaseId) {
|
||||
const knex = await databases.init(databaseId);
|
||||
await applyDatabaseMigrations(knex);
|
||||
const connection = { applyMutation: jest.fn() };
|
||||
const connection = { applyMutation: jest.fn(), refresh: jest.fn() };
|
||||
const store = new DefaultLocationStore(knex);
|
||||
await store.connect(connection);
|
||||
return { store, connection };
|
||||
|
||||
@@ -36,6 +36,10 @@ export interface EntityProviderConnection {
|
||||
* Applies either a full or delta update to the catalog engine.
|
||||
*/
|
||||
applyMutation(mutation: EntityProviderMutation): Promise<void>;
|
||||
|
||||
/**
|
||||
* Schedules a refresh on all of the entities that has a matching refresh key associated with the provided keys.
|
||||
*/
|
||||
refresh(keys: string[]): Promise<void>;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user