@Test public void testIntegrityCheck_DefaultStrategy() throws Exception { configuration.setBoolean(RESTORE_BLOBS, false); configuration.setBoolean(UNDELETE_BLOBS, false); configuration.setBoolean(INTEGRITY_CHECK, true); underTest.configure(configuration); when(repositoryManager.browseForBlobStore(any())).thenReturn(singletonList(repository)); when(mavenFormat.getValue()).thenReturn("foo"); underTest.execute(); verify(defaultIntegrityCheckStrategy).check(any(), any(), any(), any()); verifyZeroInteractions(testIntegrityCheckStrategy); }
@Override protected Void execute() throws Exception { String blobStoreId = checkNotNull(getConfiguration().getString(BLOB_STORE_NAME_FIELD_ID)); boolean dryRun = getConfiguration().getBoolean(DRY_RUN, false); boolean restoreBlobs = getConfiguration().getBoolean(RESTORE_BLOBS, false); boolean undeleteBlobs = getConfiguration().getBoolean(UNDELETE_BLOBS, false); boolean integrityCheck = getConfiguration().getBoolean(INTEGRITY_CHECK, false); restore(blobStoreId, restoreBlobs, undeleteBlobs, dryRun); blobStoreIntegrityCheck(integrityCheck, blobStoreId); return null; }
RestoreMetadataTask extends TaskSupport implements Cancelable { @Override protected Void execute() throws Exception { String blobStoreId = checkNotNull(getConfiguration().getString(BLOB_STORE_NAME_FIELD_ID)); boolean dryRun = getConfiguration().getBoolean(DRY_RUN, false); boolean restoreBlobs = getConfiguration().getBoolean(RESTORE_BLOBS, false); boolean undeleteBlobs = getConfiguration().getBoolean(UNDELETE_BLOBS, false); boolean integrityCheck = getConfiguration().getBoolean(INTEGRITY_CHECK, false); restore(blobStoreId, restoreBlobs, undeleteBlobs, dryRun); blobStoreIntegrityCheck(integrityCheck, blobStoreId); return null; } }
RestoreMetadataTask extends TaskSupport implements Cancelable { @Override protected Void execute() throws Exception { String blobStoreId = checkNotNull(getConfiguration().getString(BLOB_STORE_NAME_FIELD_ID)); boolean dryRun = getConfiguration().getBoolean(DRY_RUN, false); boolean restoreBlobs = getConfiguration().getBoolean(RESTORE_BLOBS, false); boolean undeleteBlobs = getConfiguration().getBoolean(UNDELETE_BLOBS, false); boolean integrityCheck = getConfiguration().getBoolean(INTEGRITY_CHECK, false); restore(blobStoreId, restoreBlobs, undeleteBlobs, dryRun); blobStoreIntegrityCheck(integrityCheck, blobStoreId); return null; } @Inject  RestoreMetadataTask(final BlobStoreManager blobStoreManager,
                             final RepositoryManager repositoryManager,
                             final Map<String, RestoreBlobStrategy> restoreBlobStrategies,
                             final BlobStoreUsageChecker blobStoreUsageChecker,
                             final DryRunPrefix dryRunPrefix,
                             final Map<String, IntegrityCheckStrategy> integrityCheckStrategies,
                             final BucketStore bucketStore,
                             final MaintenanceService maintenanceService); }
RestoreMetadataTask extends TaskSupport implements Cancelable { @Override protected Void execute() throws Exception { String blobStoreId = checkNotNull(getConfiguration().getString(BLOB_STORE_NAME_FIELD_ID)); boolean dryRun = getConfiguration().getBoolean(DRY_RUN, false); boolean restoreBlobs = getConfiguration().getBoolean(RESTORE_BLOBS, false); boolean undeleteBlobs = getConfiguration().getBoolean(UNDELETE_BLOBS, false); boolean integrityCheck = getConfiguration().getBoolean(INTEGRITY_CHECK, false); restore(blobStoreId, restoreBlobs, undeleteBlobs, dryRun); blobStoreIntegrityCheck(integrityCheck, blobStoreId); return null; } @Inject  RestoreMetadataTask(final BlobStoreManager blobStoreManager,
                             final RepositoryManager repositoryManager,
                             final Map<String, RestoreBlobStrategy> restoreBlobStrategies,
                             final BlobStoreUsageChecker blobStoreUsageChecker,
                             final DryRunPrefix dryRunPrefix,
                             final Map<String, IntegrityCheckStrategy> integrityCheckStrategies,
                             final BucketStore bucketStore,
                             final MaintenanceService maintenanceService); @Override String getMessage(); }
RestoreMetadataTask extends TaskSupport implements Cancelable { @Override protected Void execute() throws Exception { String blobStoreId = checkNotNull(getConfiguration().getString(BLOB_STORE_NAME_FIELD_ID)); boolean dryRun = getConfiguration().getBoolean(DRY_RUN, false); boolean restoreBlobs = getConfiguration().getBoolean(RESTORE_BLOBS, false); boolean undeleteBlobs = getConfiguration().getBoolean(UNDELETE_BLOBS, false); boolean integrityCheck = getConfiguration().getBoolean(INTEGRITY_CHECK, false); restore(blobStoreId, restoreBlobs, undeleteBlobs, dryRun); blobStoreIntegrityCheck(integrityCheck, blobStoreId); return null; } @Inject  RestoreMetadataTask(final BlobStoreManager blobStoreManager,
                             final RepositoryManager repositoryManager,
                             final Map<String, RestoreBlobStrategy> restoreBlobStrategies,
                             final BlobStoreUsageChecker blobStoreUsageChecker,
                             final DryRunPrefix dryRunPrefix,
                             final Map<String, IntegrityCheckStrategy> integrityCheckStrategies,
                             final BucketStore bucketStore,
                             final MaintenanceService maintenanceService); @Override String getMessage();  }