Skip to content

Commit

Permalink
Change test template to use data section for generic templates #1098
Browse files Browse the repository at this point in the history
- changed ont test inside
  SecHubExecutionScenarioSecHubClientIntTest to use
  CLIENT_JSON_SOURCESCAN_GENERIC_TEMPLATE_NO_DATA_SECTION because
  client does currently not support upload by data-section correctly
  the sechub client based test does now use only the old approach.
- updated #1161 to make it clear that this must implemented for client
  and tested as well on server side
  • Loading branch information
de-jcup committed Apr 5, 2022
1 parent eead566 commit bc7795f
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ public enum IntegrationTestJSONLocation {

CLIENT_JSON_SOURCESCAN_GENERIC_TEMPLATE("sechub-integrationtest-client-sourcescan-generic-template.json"),

CLIENT_JSON_SOURCESCAN_GENERIC_TEMPLATE_NO_DATA_SECTION("sechub-integrationtest-client-sourcescan-generic-template-no-data-section.json"),

/** will use checkmarx-mockdata-multiple.xml as result */
CLIENT_JSON_SOURCESCAN_YELLOW("sechub-integrationtest-client-sourcescan-yellow.json"),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ public void a_project_having_no_problems_can_be_executed_as_codescan_and_results

@SuppressWarnings("deprecation") // we use startDownloadJobReport here - old implementation okay here
@Test
public void sechub_client_can_execute_a_config_file_which_uses_template_variables_of_environment_entries() {
public void sechub_client_can_execute_a_config_file_which_uses_template_variables_of_environment_entries_but_no_data_section() {
/* @formatter:off */

/* prepare */
Expand All @@ -337,7 +337,7 @@ public void sechub_client_can_execute_a_config_file_which_uses_template_variable
envEntries.put("SHTEST_FOLDERS1", IntegrationTestMockMode.CODE_SCAN__CHECKMARX__GREEN__FAST.getTarget());

/* execute */
IntegrationTestJSONLocation location = CLIENT_JSON_SOURCESCAN_GENERIC_TEMPLATE;
IntegrationTestJSONLocation location = IntegrationTestJSONLocation.CLIENT_JSON_SOURCESCAN_GENERIC_TEMPLATE_NO_DATA_SECTION;
UUID jobUUID =
as(user).
withSecHubClient().
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"apiVersion" : "{{ .SHTEST_VERSION }}" ,

"codeScan": {
"fileSystem": {
"folders": ["{{ .SHTEST_FOLDERS1 }}"]
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@
"apiVersion" : "{{ .SHTEST_VERSION }}" ,

"data" : {
"name" : "the-used-testfolders",
"fileSystem": {
"folders": ["{{ .SHTEST_FOLDERS1 }}"]
}
}
"sources" : [
{
"name" : "the-used-testfolders",

"fileSystem": {
"folders": ["{{ .SHTEST_FOLDERS1 }}"]
}
}
]

},

"codeScan": {
"use" : [ "the-used-testfolders"]]
"use" : [ "the-used-testfolders"]
}

}

0 comments on commit bc7795f

Please sign in to comment.