Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alovew committed Jul 8, 2022
1 parent 8b78687 commit cb7780b
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -574,11 +574,7 @@ void testUpdateConnectionWithOperations() throws JsonValidationException, Config
when(configRepository.getConfiguredCatalogForConnection(expected.getConnectionId()))
.thenReturn(ConnectionHelpers.generateBasicConfiguredAirbyteCatalog());

final StreamDescriptor streamDescriptorAdd = new StreamDescriptor().name("addStream");
final StreamTransform streamTransformAdd =
new StreamTransform().streamDescriptor(streamDescriptorAdd).transformType(TransformTypeEnum.ADD_STREAM);

final CatalogDiff catalogDiff = new CatalogDiff().transforms(List.of(streamTransformAdd));
final CatalogDiff catalogDiff = new CatalogDiff().transforms(List.of());
when(connectionsHandler.getDiff(any(), any())).thenReturn(catalogDiff);
final ConnectionIdRequestBody connectionIdRequestBody = new ConnectionIdRequestBody().connectionId(expected.getConnectionId());
when(stateHandler.getState(connectionIdRequestBody)).thenReturn(new ConnectionState().stateType(ConnectionStateType.LEGACY));
Expand All @@ -602,6 +598,7 @@ void testUpdateConnectionWithOperations() throws JsonValidationException, Config
.schedule(expected.getSchedule()));
when(operationsHandler.updateOperation(operationUpdate)).thenReturn(new OperationRead().operationId(operationUpdate.getOperationId()));
when(operationsHandler.listOperationsForConnection(any())).thenReturn(operationReadList);

final WebBackendConnectionRead actualConnectionRead = wbHandler.webBackendUpdateConnection(updateBody);

assertEquals(connectionRead.getOperationIds(), actualConnectionRead.getOperationIds());
Expand Down

0 comments on commit cb7780b

Please sign in to comment.