use of com.aws.greengrass.componentmanager.converter.RecipeLoader 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.componentmanager.converter.RecipeLoader 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);
}
Aggregations