Change the description header of the changeset and also add a unit test for new URL method
Signed-off-by: armandocomellas1 <cgarmando@google.com>
This commit is contained in:
@@ -213,4 +213,31 @@ describe('UrlReaderProcessor', () => {
|
||||
|
||||
expect(reader.search).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it('parser return valid URL with wildcard *', async () => {
|
||||
const logger = getVoidLogger();
|
||||
|
||||
const reader: jest.Mocked<UrlReader> = {
|
||||
readUrl: jest.fn(),
|
||||
readTree: jest.fn(),
|
||||
search: jest.fn().mockImplementation(async () => []),
|
||||
};
|
||||
|
||||
const processor = new UrlReaderProcessor({ reader, logger });
|
||||
|
||||
const emit = jest.fn();
|
||||
|
||||
await processor.readLocation(
|
||||
{
|
||||
type: 'url',
|
||||
target: 'https://storage.cloud.google.com/ah-backstage-poc-catalog/*',
|
||||
},
|
||||
false,
|
||||
emit,
|
||||
defaultEntityDataParser,
|
||||
mockCache,
|
||||
);
|
||||
|
||||
expect(reader.search).toHaveReturned();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user