From b129e0214abc622fb6bbd7858464e0f9d7b3b9b7 Mon Sep 17 00:00:00 2001 From: Sean Tan Date: Wed, 25 Aug 2021 10:48:27 -0700 Subject: [PATCH] Change AwsS3ReadTreeProcessor tests as to not interfere with FileReaderProcessor tests Signed-off-by: Sean Tan --- .../src/ingestion/processors/AwsS3ReadTreeProcessor.test.ts | 6 +++--- .../src/ingestion/processors/FileReaderProcessor.test.ts | 2 +- .../awsS3/{awsS3-mock-object.yaml => awsS3-mock-object.txt} | 0 3 files changed, 4 insertions(+), 4 deletions(-) rename plugins/catalog-backend/src/ingestion/processors/__fixtures__/fileReaderProcessor/awsS3/{awsS3-mock-object.yaml => awsS3-mock-object.txt} (100%) diff --git a/plugins/catalog-backend/src/ingestion/processors/AwsS3ReadTreeProcessor.test.ts b/plugins/catalog-backend/src/ingestion/processors/AwsS3ReadTreeProcessor.test.ts index 0b8ea6f814..ebc258a29e 100644 --- a/plugins/catalog-backend/src/ingestion/processors/AwsS3ReadTreeProcessor.test.ts +++ b/plugins/catalog-backend/src/ingestion/processors/AwsS3ReadTreeProcessor.test.ts @@ -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' }); diff --git a/plugins/catalog-backend/src/ingestion/processors/FileReaderProcessor.test.ts b/plugins/catalog-backend/src/ingestion/processors/FileReaderProcessor.test.ts index c1dfbb0af7..41c7e4f732 100644 --- a/plugins/catalog-backend/src/ingestion/processors/FileReaderProcessor.test.ts +++ b/plugins/catalog-backend/src/ingestion/processors/FileReaderProcessor.test.ts @@ -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', diff --git a/plugins/catalog-backend/src/ingestion/processors/__fixtures__/fileReaderProcessor/awsS3/awsS3-mock-object.yaml b/plugins/catalog-backend/src/ingestion/processors/__fixtures__/fileReaderProcessor/awsS3/awsS3-mock-object.txt similarity index 100% rename from plugins/catalog-backend/src/ingestion/processors/__fixtures__/fileReaderProcessor/awsS3/awsS3-mock-object.yaml rename to plugins/catalog-backend/src/ingestion/processors/__fixtures__/fileReaderProcessor/awsS3/awsS3-mock-object.txt