fix: Revert local changes to BlackDuckTestConnection.
package com.synopsys.integration.detect.battery.docker.integration;
-import java.util.Map;
+import org.junit.jupiter.api.Assertions;
import com.synopsys.integration.blackduck.configuration.BlackDuckServerConfig;
import com.synopsys.integration.blackduck.configuration.BlackDuckServerConfigBuilder;
@@ -28,16 +28,11 @@ public class BlackDuckTestConnection {
}
public static BlackDuckTestConnection fromEnvironment() {
- Map<String, String> env = System.getenv();
+ Assertions.assertTrue(System.getenv().containsKey(BLACKDUCK_URL), "Integration tests require BLACKDUCK_URL is set in the environment");
+ Assertions.assertTrue(System.getenv().containsKey(BLACKDUCK_API_TOKEN), "Integration tests require BLACKDUCK_API_TOKEN is set in the environment");
- // Assertions.assertTrue(System.getenv().containsKey(BLACKDUCK_URL), "Integration tests require BLACKDUCK_URL is set in the environment");
- //// Assertions.assertTrue(System.getenv().containsKey(BLACKDUCK_API_TOKEN), "Integration tests require BLACKDUCK_API_TOKEN is set in the environment");
- ////
- //// String blackduckUrl = System.getenv().get(BLACKDUCK_URL);
- //// String blackduckApiToken = System.getenv().get(BLACKDUCK_API_TOKEN);
-
- String blackduckUrl = "https://us1a-int-bdstarlabs.nprd.sig.synopsys.com";
- String blackduckApiToken = "YjdlMTQzNDgtZTMwNi00MGY2LWI0NDAtNWI1NTE2YzlhN2YzOmZjOWZhYWE3LTkxZjgtNDYzYy1iOWU5LWMxNDZhZDFkNTk4Nw==";
+ String blackduckUrl = System.getenv().get(BLACKDUCK_URL);
+ String blackduckApiToken = System.getenv().get(BLACKDUCK_API_TOKEN);
BlackDuckServerConfigBuilder blackDuckServerConfigBuilder = BlackDuckServerConfig.newBuilder();
blackDuckServerConfigBuilder.setProperties(System.getenv().entrySet());
