diff --git a/sechub-systemtest/src/test/java/com/mercedesbenz/sechub/systemtest/config/SystemTestConfigurationTest.java b/sechub-systemtest/src/test/java/com/mercedesbenz/sechub/systemtest/config/SystemTestConfigurationTest.java index 2917c9cd02..7301e97a19 100644 --- a/sechub-systemtest/src/test/java/com/mercedesbenz/sechub/systemtest/config/SystemTestConfigurationTest.java +++ b/sechub-systemtest/src/test/java/com/mercedesbenz/sechub/systemtest/config/SystemTestConfigurationTest.java @@ -15,6 +15,8 @@ import org.slf4j.LoggerFactory; import com.mercedesbenz.sechub.commons.model.JSONConverter; +import com.mercedesbenz.sechub.commons.model.SecHubCodeScanConfiguration; +import com.mercedesbenz.sechub.commons.model.SecHubSecretScanConfiguration; import com.mercedesbenz.sechub.commons.model.TrafficLight; class SystemTestConfigurationTest { @@ -25,6 +27,8 @@ class SystemTestConfigurationTest { private static final String DEFINED_PROFILE = "a-defined-profile-when-not-default-used"; + private static final String DEFINED_REFERENCE_ID = "an-upload-reference-id"; + @Test void a_full_blown_setup_can_be_serialized_and_deserialized() throws Exception { @@ -254,11 +258,21 @@ private void buildTest(SystemTestConfiguration configuration) { runSecHubJob1.setProject(DEFINED_PROJECT_NAME); UploadDefinition upload = new UploadDefinition(); - upload.setComment("Here we can define either binaries or sources to upload - we define the folders, framework will create tars/zips automatically"); + upload.setComment( + "Here we can define either binaries or sources to upload - we define the folders, framework will create tars/zips automatically. When no upload reference id is defined, " + + DefaultFallback.FALLBACK_UPLOAD_REF_ID.getValue() + " is used as default"); upload.setSourceFolder(Optional.of("./checkout/sources")); - upload.setReferenceId(Optional.of(DefaultFallback.FALLBACK_UPLOAD_REF_ID.getValue())); + upload.setReferenceId(Optional.of(DEFINED_REFERENCE_ID)); runSecHubJob1.getUploads().add(upload); + SecHubCodeScanConfiguration codeScan = new SecHubCodeScanConfiguration(); + codeScan.getNamesOfUsedDataConfigurationObjects().add(DEFINED_REFERENCE_ID); + runSecHubJob1.setCodeScan(Optional.of(codeScan)); + + SecHubSecretScanConfiguration secretScan = new SecHubSecretScanConfiguration(); + secretScan.getNamesOfUsedDataConfigurationObjects().add(DEFINED_REFERENCE_ID); + runSecHubJob1.setSecretScan(Optional.of(secretScan)); + test1execute1.setRunSecHubJob(Optional.of(runSecHubJob1)); // asserts