Search in sources :

Example 16 with BlackDuckConnectionDetails

use of com.synopsys.integration.detect.configuration.connection.BlackDuckConnectionDetails in project synopsys-detect by blackducksoftware.

the class ProductBootFactory method createBlackDuckServerConfig.

public BlackDuckServerConfig createBlackDuckServerConfig() throws DetectUserFriendlyException {
    BlackDuckConnectionDetails connectionDetails = detectConfigurationFactory.createBlackDuckConnectionDetails();
    BlackDuckConfigFactory blackDuckConfigFactory = new BlackDuckConfigFactory(detectInfo, connectionDetails);
    return blackDuckConfigFactory.createServerConfig(new SilentIntLogger());
}
Also used : SilentIntLogger(com.synopsys.integration.log.SilentIntLogger) BlackDuckConnectionDetails(com.synopsys.integration.detect.configuration.connection.BlackDuckConnectionDetails) BlackDuckConfigFactory(com.synopsys.integration.detect.configuration.connection.BlackDuckConfigFactory)

Example 17 with BlackDuckConnectionDetails

use of com.synopsys.integration.detect.configuration.connection.BlackDuckConnectionDetails 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());
}
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 18 with BlackDuckConnectionDetails

use of com.synopsys.integration.detect.configuration.connection.BlackDuckConnectionDetails 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());
}
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 19 with BlackDuckConnectionDetails

use of com.synopsys.integration.detect.configuration.connection.BlackDuckConnectionDetails 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 20 with BlackDuckConnectionDetails

use of com.synopsys.integration.detect.configuration.connection.BlackDuckConnectionDetails 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)

Aggregations

BlackDuckConnectionDetails (com.synopsys.integration.detect.configuration.connection.BlackDuckConnectionDetails)22 BlackDuckDecision (com.synopsys.integration.detect.lifecycle.boot.decision.BlackDuckDecision)21 ProductDecider (com.synopsys.integration.detect.lifecycle.boot.decision.ProductDecider)21 Test (org.junit.jupiter.api.Test)21 BlackDuckSignatureScannerOptions (com.synopsys.integration.detect.tool.signaturescanner.BlackDuckSignatureScannerOptions)13 Path (java.nio.file.Path)2 BlackDuckConfigFactory (com.synopsys.integration.detect.configuration.connection.BlackDuckConfigFactory)1 SilentIntLogger (com.synopsys.integration.log.SilentIntLogger)1