test(catalog:) extend existing tests

Signed-off-by: Benjamin Janssens <benji.janssens@gmail.com>
This commit is contained in:
Benjamin Janssens
2025-05-09 11:57:57 +02:00
parent ee9f59f3e0
commit 9e6c479fdd
@@ -92,6 +92,12 @@ describe('readProviderConfigs', () => {
visibility: ['public', 'internal'],
},
},
providerWithArchiveFilter: {
organization: 'test-org6',
filters: {
includeArchived: true,
},
},
providerWithHost: {
organization: 'test-org1',
host: 'ghe.internal.com',
@@ -111,7 +117,7 @@ describe('readProviderConfigs', () => {
});
const providerConfigs = readProviderConfigs(config);
expect(providerConfigs).toHaveLength(9);
expect(providerConfigs).toHaveLength(10);
expect(providerConfigs[0]).toEqual({
id: 'providerOrganizationOnly',
organization: 'test-org1',
@@ -246,6 +252,25 @@ describe('readProviderConfigs', () => {
validateLocationsExist: false,
});
expect(providerConfigs[7]).toEqual({
id: 'providerWithArchiveFilter',
organization: 'test-org6',
catalogPath: '/catalog-info.yaml',
host: 'github.com',
filters: {
repository: undefined,
branch: undefined,
allowForks: true,
topic: {
include: undefined,
exclude: undefined,
},
visibility: undefined,
includeArchived: true,
},
schedule: DEFAULT_GITHUB_ENTITY_PROVIDER_CONFIG_SCHEDULE,
validateLocationsExist: false,
});
expect(providerConfigs[8]).toEqual({
id: 'providerWithHost',
organization: 'test-org1',
catalogPath: '/catalog-info.yaml',
@@ -264,7 +289,7 @@ describe('readProviderConfigs', () => {
validateLocationsExist: false,
schedule: DEFAULT_GITHUB_ENTITY_PROVIDER_CONFIG_SCHEDULE,
});
expect(providerConfigs[8]).toEqual({
expect(providerConfigs[9]).toEqual({
id: 'providerWithSchedule',
organization: 'test-org1',
catalogPath: '/catalog-info.yaml',