Change AwsS3ReadTreeProcessor tests as to not interfere with FileReaderProcessor tests

Signed-off-by: Sean Tan <seant@splunk.com>
This commit is contained in:
Sean Tan
2021-08-25 10:48:27 -07:00
parent adf7187777
commit b129e0214a
3 changed files with 4 additions and 4 deletions
@@ -24,7 +24,7 @@ import path from 'path';
AWSMock.setSDKInstance(aws);
const object: aws.S3.Types.Object = {
Key: 'awsS3-mock-object.yaml',
Key: 'awsS3-mock-object.txt',
};
const objectList: aws.S3.ObjectList = [object];
const output: aws.S3.Types.ListObjectsV2Output = {
@@ -43,7 +43,7 @@ AWSMock.mock(
'__fixtures__',
'fileReaderProcessor',
'awsS3',
'awsS3-mock-object.yaml',
'awsS3-mock-object.txt',
),
),
),
@@ -70,7 +70,7 @@ describe('readLocation', () => {
)) as CatalogProcessorEntityResult;
expect(generated.type).toBe('entity');
expect(generated.location).toEqual({
target: 'awsS3-mock-object.yaml',
target: 'awsS3-mock-object.txt',
type: 's3-bucket',
});
expect(generated.entity).toEqual({ site_name: 'Test' });
@@ -77,7 +77,7 @@ describe('FileReaderProcessor', () => {
emit,
);
expect(emit).toBeCalledTimes(3);
expect(emit).toBeCalledTimes(2);
expect(emit.mock.calls[0][0].entity).toEqual({ kind: 'Component' });
expect(emit.mock.calls[0][0].location).toEqual({
type: 'file',