Skip to content

Commit

Permalink
fix: find services during deployment using serviceName (#1539)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeDombo authored Oct 5, 2023
1 parent f188e27 commit b658c70
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,8 @@ public AggregateServicesChangeManager(Kernel kernel, Map<String, Object> newServ
// No builtin services should be modified in any way by deployments outside of
// Nucleus component update
Set<String> runningDeployableServices =
kernel.orderedDependencies().stream().filter(s -> !s.isBuiltin()).map(GreengrassService::getName)
kernel.orderedDependencies().stream().filter(s -> !s.isBuiltin())
.map(GreengrassService::getServiceName)
.collect(Collectors.toSet());

this.kernel = kernel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -536,13 +536,15 @@ private Deployment createMockDeployment(DeploymentDocument doc) {

private GreengrassService createMockGreengrassService(String name) {
GreengrassService service = mock(GreengrassService.class);
when(service.getName()).thenReturn(name);
lenient().when(service.getName()).thenReturn(name);
lenient().when(service.getServiceName()).thenReturn(name);
return service;
}

private GreengrassService createMockGreengrassService(String name, Kernel kernel) throws ServiceLoadException {
GreengrassService service = mock(GreengrassService.class);
lenient().when(service.getName()).thenReturn(name);
lenient().when(service.getServiceName()).thenReturn(name);
lenient().when(kernel.locate(name)).thenReturn(service);
return service;
}
Expand Down

0 comments on commit b658c70

Please sign in to comment.