use of com.synopsys.integration.detect.tool.signaturescanner.BlackDuckSignatureScannerOptions in project synopsys-detect by blackducksoftware.
the class ProductDeciderTest method shouldNotRunBlackduckRapidModeAndBDIO2Disabled.
@Test
public void shouldNotRunBlackduckRapidModeAndBDIO2Disabled() {
BlackDuckConnectionDetails blackDuckConnectionDetails = blackDuckConnectionDetails(false, VALID_URL);
BlackDuckSignatureScannerOptions blackDuckSignatureScannerOptions = blackDuckSignatureScannerOptions(null, null);
BlackDuckDecision productDecision = new ProductDecider().decideBlackDuck(blackDuckConnectionDetails, blackDuckSignatureScannerOptions, BlackduckScanMode.RAPID, createBdioOptions(false, true));
Assertions.assertFalse(productDecision.shouldRun());
}
use of com.synopsys.integration.detect.tool.signaturescanner.BlackDuckSignatureScannerOptions in project synopsys-detect by blackducksoftware.
the class ProductDeciderTest method shouldRunBlackduckIntelligentModeAndBDIO2Enabled.
@Test
public void shouldRunBlackduckIntelligentModeAndBDIO2Enabled() {
BlackDuckConnectionDetails blackDuckConnectionDetails = blackDuckConnectionDetails(false, VALID_URL);
BlackDuckSignatureScannerOptions blackDuckSignatureScannerOptions = blackDuckSignatureScannerOptions(null, null);
BlackDuckDecision productDecision = new ProductDecider().decideBlackDuck(blackDuckConnectionDetails, blackDuckSignatureScannerOptions, BlackduckScanMode.INTELLIGENT, createBdioOptions(true, false));
Assertions.assertTrue(productDecision.shouldRun());
}
use of com.synopsys.integration.detect.tool.signaturescanner.BlackDuckSignatureScannerOptions in project synopsys-detect by blackducksoftware.
the class DetectConfigurationFactory method createBlackDuckSignatureScannerOptions.
public BlackDuckSignatureScannerOptions createBlackDuckSignatureScannerOptions() {
List<Path> signatureScannerPaths = detectConfiguration.getPaths(DetectProperties.DETECT_BLACKDUCK_SIGNATURE_SCANNER_PATHS);
List<String> exclusionPatterns = collectSignatureScannerDirectoryExclusions();
Integer scanMemory = detectConfiguration.getValue(DetectProperties.DETECT_BLACKDUCK_SIGNATURE_SCANNER_MEMORY);
Boolean dryRun = detectConfiguration.getValue(DetectProperties.DETECT_BLACKDUCK_SIGNATURE_SCANNER_DRY_RUN);
Boolean uploadSource = detectConfiguration.getValue(DetectProperties.DETECT_BLACKDUCK_SIGNATURE_SCANNER_UPLOAD_SOURCE_MODE);
Boolean licenseSearch = detectConfiguration.getValue(DetectProperties.DETECT_BLACKDUCK_SIGNATURE_SCANNER_LICENSE_SEARCH);
Boolean copyrightSearch = detectConfiguration.getValue(DetectProperties.DETECT_BLACKDUCK_SIGNATURE_SCANNER_COPYRIGHT_SEARCH);
Boolean followSymLinks = getFollowSymLinks();
String additionalArguments = detectConfiguration.getNullableValue(DetectProperties.DETECT_BLACKDUCK_SIGNATURE_SCANNER_ARGUMENTS);
Path localScannerInstallPath = detectConfiguration.getPathOrNull(DetectProperties.DETECT_BLACKDUCK_SIGNATURE_SCANNER_LOCAL_PATH);
Integer maxDepth = detectConfiguration.getValue(DetectProperties.DETECT_EXCLUDED_DIRECTORIES_SEARCH_DEPTH);
Boolean treatSkippedScansAsSuccess = detectConfiguration.getValue(DetectProperties.DETECT_FORCE_SUCCESS_ON_SKIP);
return new BlackDuckSignatureScannerOptions(signatureScannerPaths, exclusionPatterns, localScannerInstallPath, scanMemory, findParallelProcessors(), dryRun, findSnippetMatching(), uploadSource, additionalArguments, maxDepth, findIndividualFileMatching(), licenseSearch, copyrightSearch, followSymLinks, treatSkippedScansAsSuccess);
}
use of com.synopsys.integration.detect.tool.signaturescanner.BlackDuckSignatureScannerOptions in project synopsys-detect by blackducksoftware.
the class ProductDeciderTest method shouldRunBlackduckRapidModeAndBDIO2Enabled.
@Test
public void shouldRunBlackduckRapidModeAndBDIO2Enabled() {
BlackDuckConnectionDetails blackDuckConnectionDetails = blackDuckConnectionDetails(false, VALID_URL);
BlackDuckSignatureScannerOptions blackDuckSignatureScannerOptions = blackDuckSignatureScannerOptions(null, null);
BlackDuckDecision productDecision = new ProductDecider().decideBlackDuck(blackDuckConnectionDetails, blackDuckSignatureScannerOptions, BlackduckScanMode.RAPID, createBdioOptions(true, true));
Assertions.assertTrue(productDecision.shouldRun());
}
use of com.synopsys.integration.detect.tool.signaturescanner.BlackDuckSignatureScannerOptions in project synopsys-detect by blackducksoftware.
the class ProductDeciderTest method shouldRunBlackDuckOfflineWhenInstallUrl.
@Test
public void shouldRunBlackDuckOfflineWhenInstallUrl() {
BlackDuckConnectionDetails blackDuckConnectionDetails = blackDuckConnectionDetails(true, null);
BlackDuckSignatureScannerOptions blackDuckSignatureScannerOptions = blackDuckSignatureScannerOptions(null, VALID_URL);
BlackDuckDecision productDecision = new ProductDecider().decideBlackDuck(blackDuckConnectionDetails, blackDuckSignatureScannerOptions, BlackduckScanMode.INTELLIGENT, createBdioOptions(false, true));
Assertions.assertTrue(productDecision.shouldRun());
Assertions.assertTrue(productDecision.isOffline());
}
Aggregations