test: fix IT for new project structure
@@ -52,9 +52,10 @@ public class DetectOnDetectHappyPath extends BlackDuckIntegrationTest {
public static final String SIGNATURE_SCAN_CODE_LOCATION_SUFFIX = "/synopsys-detect-junit/happy-path scan";
public static final String DETECTABLE_CODE_LOCATION_SUFFIX = "/detectable/com.synopsys.integration/detectable/%s gradle/bom";
public static final String SYNOPSYS_DETECT_CODE_LOCATION_SUFFIX = "/com.synopsys.integration/synopsys-detect/%s gradle/bom";
- public static final String DETECT_CONFIGURATION_CODE_LOCATION_SUFFIX = "/detect-configuration/com.synopsys.integration/detect-configuration/%s gradle/bom";
+ public static final String DETECT_CONFIGURATION_CODE_LOCATION_SUFFIX = "/configuration/com.synopsys.integration/configuration/%s gradle/bom";
public static final String CONFIGURATION_CODE_LOCATION_SUFFIX = "/configuration/com.synopsys.integration/configuration/%s gradle/bom";
public static final String DETECTOR_CODE_LOCATION_SUFFIX = "/detector/com.synopsys.integration/detector/%s gradle/bom";
+ public static final String POLARIS_CODE_LOCATION_SUFFIX = "/polaris/com.synopsys.integration/polaris/%s gradle/bom";
private ProjectView projectToDelete = null;
private List<CodeLocationView> codeLocationsToDelete = null;
@@ -93,6 +94,7 @@ public class DetectOnDetectHappyPath extends BlackDuckIntegrationTest {
codeLocationNameSuffixesToCheck.add(String.format(DETECT_CONFIGURATION_CODE_LOCATION_SUFFIX, version));
codeLocationNameSuffixesToCheck.add(String.format(CONFIGURATION_CODE_LOCATION_SUFFIX, version));
codeLocationNameSuffixesToCheck.add(String.format(DETECTOR_CODE_LOCATION_SUFFIX, version));
+ codeLocationNameSuffixesToCheck.add(String.format(POLARIS_CODE_LOCATION_SUFFIX, version));
final String projectName = "synopsys-detect-junit";
final String projectVersionName = "happy-path";
@@ -114,14 +116,15 @@ public class DetectOnDetectHappyPath extends BlackDuckIntegrationTest {
for (final String codeLocationName : createdCodeLocationNames) {
if (codeLocationName.endsWith(suffix)) {
matches++;
+ break;
}
}
}
assertEquals(codeLocationNameSuffixesToCheck.size(), matches);
- List<ProjectVersionComponentView> bomComponents = projectBomService.getComponentsForProjectVersion(projectVersionWrapper.getProjectVersionView());
+ final List<ProjectVersionComponentView> bomComponents = projectBomService.getComponentsForProjectVersion(projectVersionWrapper.getProjectVersionView());
// We used to look for blackduck-common, but we adopt new versions faster than KB can pick them up
- Optional<ProjectVersionComponentView> blackDuckCommonComponent = bomComponents.stream().filter(ProjectVersionComponentView -> "jackson-core".equals(ProjectVersionComponentView.getComponentName())).findFirst();
+ final Optional<ProjectVersionComponentView> blackDuckCommonComponent = bomComponents.stream().filter(ProjectVersionComponentView -> "jackson-core".equals(ProjectVersionComponentView.getComponentName())).findFirst();
assertTrue(blackDuckCommonComponent.isPresent());
}
