use of com.aws.greengrass.config.PlatformResolver in project aws-greengrass-nucleus by aws-greengrass.
the class ComponentStoreTest method beforeEach.
@BeforeEach
void beforeEach() throws IOException {
platformResolver = new PlatformResolver(null);
recipeLoader = new RecipeLoader(platformResolver);
nucleusPaths = new NucleusPaths();
nucleusPaths.setComponentStorePath(packageStoreRootPath);
componentStore = new ComponentStore(nucleusPaths, platformResolver, recipeLoader);
recipeDirectory = packageStoreRootPath.resolve("recipes");
artifactDirectory = packageStoreRootPath.resolve("artifacts");
artifactsUnpackDirectory = packageStoreRootPath.resolve("artifacts-unarchived");
}
use of com.aws.greengrass.config.PlatformResolver in project aws-greengrass-nucleus by aws-greengrass.
the class ComponentManagerTest method beforeEach.
@BeforeEach
void beforeEach() throws Exception {
PlatformResolver platformResolver = new PlatformResolver(null);
recipeLoader = new RecipeLoader(platformResolver);
lenient().when(artifactDownloader.downloadRequired()).thenReturn(true);
lenient().when(artifactDownloader.checkDownloadable()).thenReturn(Optional.empty());
lenient().when(artifactDownloader.checkComponentStoreSize()).thenReturn(true);
lenient().when(artifactDownloader.canSetFilePermissions()).thenReturn(true);
lenient().when(artifactDownloader.canUnarchiveArtifact()).thenReturn(true);
lenient().when(artifactDownloaderFactory.getArtifactDownloader(any(), any(), any())).thenReturn(artifactDownloader);
lenient().when(deviceConfiguration.isDeviceConfiguredToTalkToCloud()).thenReturn(true);
Topic maxSizeTopic = Topic.of(context, COMPONENT_STORE_MAX_SIZE_BYTES, COMPONENT_STORE_MAX_SIZE_DEFAULT_BYTES);
lenient().when(deviceConfiguration.getComponentStoreMaxSizeBytes()).thenReturn(maxSizeTopic);
lenient().when(componentStore.getUsableSpace()).thenReturn(100_000_000L);
componentManager = new ComponentManager(artifactDownloaderFactory, componentManagementServiceHelper, executor, componentStore, kernel, mockUnarchiver, deviceConfiguration, nucleusPaths);
}
use of com.aws.greengrass.config.PlatformResolver in project aws-greengrass-nucleus by aws-greengrass.
the class RecipeLoaderTest method setupRecipeLoader.
@BeforeEach
void setupRecipeLoader() {
PlatformResolver platformResolver = new PlatformResolver(null);
recipeLoader = new RecipeLoader(platformResolver);
}
use of com.aws.greengrass.config.PlatformResolver in project aws-greengrass-nucleus by aws-greengrass.
the class FleetStatusServiceTest method createFSS.
private FleetStatusService createFSS(int periodicUpdateIntervalSec) {
PlatformResolver platformResolver = new PlatformResolver(null);
FleetStatusService fleetStatusService = new FleetStatusService(config, mockMqttClient, mockDeploymentStatusKeeper, mockKernel, mockDeviceConfiguration, platformResolver, periodicUpdateIntervalSec);
fleetStatusService.postInject();
return fleetStatusService;
}
use of com.aws.greengrass.config.PlatformResolver in project aws-greengrass-nucleus by aws-greengrass.
the class FleetStatusServiceTest method createFSS.
private FleetStatusService createFSS() {
PlatformResolver platformResolver = new PlatformResolver(null);
FleetStatusService fleetStatusService = new FleetStatusService(config, mockMqttClient, mockDeploymentStatusKeeper, mockKernel, mockDeviceConfiguration, platformResolver);
fleetStatusService.postInject();
return fleetStatusService;
}
Aggregations