Search in sources :

Example 11 with BlackDuckSignatureScannerOptions

use of com.synopsys.integration.detect.tool.signaturescanner.BlackDuckSignatureScannerOptions in project synopsys-detect by blackducksoftware.

the class ProductDeciderTest method shouldNotRunBlackduckURLMissing.

@Test
public void shouldNotRunBlackduckURLMissing() {
    BlackDuckConnectionDetails blackDuckConnectionDetails = blackDuckConnectionDetails(false, null);
    BlackDuckSignatureScannerOptions blackDuckSignatureScannerOptions = blackDuckSignatureScannerOptions(null, null);
    BlackDuckDecision productDecision = new ProductDecider().decideBlackDuck(blackDuckConnectionDetails, blackDuckSignatureScannerOptions, BlackduckScanMode.RAPID, createBdioOptions(true, true));
    Assertions.assertFalse(productDecision.shouldRun());
}
Also used : ProductDecider(com.synopsys.integration.detect.lifecycle.boot.decision.ProductDecider) BlackDuckSignatureScannerOptions(com.synopsys.integration.detect.tool.signaturescanner.BlackDuckSignatureScannerOptions) BlackDuckConnectionDetails(com.synopsys.integration.detect.configuration.connection.BlackDuckConnectionDetails) BlackDuckDecision(com.synopsys.integration.detect.lifecycle.boot.decision.BlackDuckDecision) Test(org.junit.jupiter.api.Test)

Example 12 with BlackDuckSignatureScannerOptions

use of com.synopsys.integration.detect.tool.signaturescanner.BlackDuckSignatureScannerOptions in project synopsys-detect by blackducksoftware.

the class ProductDeciderTest method shouldRunBlackduckLegacyEnabledAndIntelligentModeAndBDIO2Disabled.

@Test
public void shouldRunBlackduckLegacyEnabledAndIntelligentModeAndBDIO2Disabled() {
    BlackDuckConnectionDetails blackDuckConnectionDetails = blackDuckConnectionDetails(false, VALID_URL);
    BlackDuckSignatureScannerOptions blackDuckSignatureScannerOptions = blackDuckSignatureScannerOptions(null, null);
    BlackDuckDecision productDecision = new ProductDecider().decideBlackDuck(blackDuckConnectionDetails, blackDuckSignatureScannerOptions, BlackduckScanMode.INTELLIGENT, createBdioOptions(false, true));
    Assertions.assertTrue(productDecision.shouldRun());
}
Also used : ProductDecider(com.synopsys.integration.detect.lifecycle.boot.decision.ProductDecider) BlackDuckSignatureScannerOptions(com.synopsys.integration.detect.tool.signaturescanner.BlackDuckSignatureScannerOptions) BlackDuckConnectionDetails(com.synopsys.integration.detect.configuration.connection.BlackDuckConnectionDetails) BlackDuckDecision(com.synopsys.integration.detect.lifecycle.boot.decision.BlackDuckDecision) Test(org.junit.jupiter.api.Test)

Example 13 with BlackDuckSignatureScannerOptions

use of com.synopsys.integration.detect.tool.signaturescanner.BlackDuckSignatureScannerOptions in project synopsys-detect by blackducksoftware.

the class ProductDeciderTest method shouldNotRunBlackDuckOfflineWhenUserProvidedHostUrl.

@Test
public void shouldNotRunBlackDuckOfflineWhenUserProvidedHostUrl() {
    BlackDuckConnectionDetails blackDuckConnectionDetails = blackDuckConnectionDetails(true, null);
    BlackDuckSignatureScannerOptions blackDuckSignatureScannerOptions = blackDuckSignatureScannerOptions(Mockito.mock(Path.class), VALID_URL);
    BlackDuckDecision productDecision = new ProductDecider().decideBlackDuck(blackDuckConnectionDetails, blackDuckSignatureScannerOptions, BlackduckScanMode.INTELLIGENT, createBdioOptions(false, true));
    Assertions.assertTrue(productDecision.shouldRun());
    Assertions.assertTrue(productDecision.isOffline());
}
Also used : Path(java.nio.file.Path) ProductDecider(com.synopsys.integration.detect.lifecycle.boot.decision.ProductDecider) BlackDuckSignatureScannerOptions(com.synopsys.integration.detect.tool.signaturescanner.BlackDuckSignatureScannerOptions) BlackDuckConnectionDetails(com.synopsys.integration.detect.configuration.connection.BlackDuckConnectionDetails) BlackDuckDecision(com.synopsys.integration.detect.lifecycle.boot.decision.BlackDuckDecision) Test(org.junit.jupiter.api.Test)

Example 14 with BlackDuckSignatureScannerOptions

use of com.synopsys.integration.detect.tool.signaturescanner.BlackDuckSignatureScannerOptions in project synopsys-detect by blackducksoftware.

the class ProductDeciderTest method shouldRunBlackDuckOfflineWhenInstallPath.

@Test
public void shouldRunBlackDuckOfflineWhenInstallPath() {
    BlackDuckConnectionDetails blackDuckConnectionDetails = blackDuckConnectionDetails(true, null);
    BlackDuckSignatureScannerOptions blackDuckSignatureScannerOptions = blackDuckSignatureScannerOptions(Mockito.mock(Path.class), null);
    BlackDuckDecision productDecision = new ProductDecider().decideBlackDuck(blackDuckConnectionDetails, blackDuckSignatureScannerOptions, BlackduckScanMode.INTELLIGENT, createBdioOptions(false, true));
    Assertions.assertTrue(productDecision.shouldRun());
    Assertions.assertTrue(productDecision.isOffline());
}
Also used : Path(java.nio.file.Path) ProductDecider(com.synopsys.integration.detect.lifecycle.boot.decision.ProductDecider) BlackDuckSignatureScannerOptions(com.synopsys.integration.detect.tool.signaturescanner.BlackDuckSignatureScannerOptions) BlackDuckConnectionDetails(com.synopsys.integration.detect.configuration.connection.BlackDuckConnectionDetails) BlackDuckDecision(com.synopsys.integration.detect.lifecycle.boot.decision.BlackDuckDecision) Test(org.junit.jupiter.api.Test)

Aggregations

BlackDuckSignatureScannerOptions (com.synopsys.integration.detect.tool.signaturescanner.BlackDuckSignatureScannerOptions)14 BlackDuckConnectionDetails (com.synopsys.integration.detect.configuration.connection.BlackDuckConnectionDetails)13 BlackDuckDecision (com.synopsys.integration.detect.lifecycle.boot.decision.BlackDuckDecision)13 ProductDecider (com.synopsys.integration.detect.lifecycle.boot.decision.ProductDecider)13 Test (org.junit.jupiter.api.Test)13 Path (java.nio.file.Path)3