Skip to content

Commit

Permalink
add branch parameter (#7)
Browse files Browse the repository at this point in the history
* add branch parameter
  • Loading branch information
pedrompflopes authored Jul 7, 2021
1 parent 1ad5dd8 commit a40e7de
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.checkmarx.ast</groupId>
<artifactId>ast-cli-java-wrapper</artifactId>
<version>1.0.5</version>
<version>1.0.6</version>
<packaging>jar</packaging>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/checkmarx/ast/CxParamType.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package com.checkmarx.ast;

public enum CxParamType {
S, V, G, PROJECT_NAME, SCAN_TYPES, SAST_PRESET_NAME, FILTER, DIRECTORY, ADDITIONAL_PARAMETERS, AGENT, SOURCES
S, V, G, PROJECT_NAME, SCAN_TYPES, SAST_PRESET_NAME, FILTER, DIRECTORY, ADDITIONAL_PARAMETERS, AGENT, SOURCES, BRANCH
}
1 change: 0 additions & 1 deletion src/main/java/com/checkmarx/ast/CxScan.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
@JsonDeserialize()
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)

public class CxScan {

private String ID;
Expand Down
9 changes: 9 additions & 0 deletions src/test/java/com/checkmarx/ast/CxAuthTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ public void cxAstScanList() throws IOException, InterruptedException {
assertTrue(scanList.size() > 0);
}

@Test
public void cxScanCreationWithBranchName() throws InterruptedException, IOException {
Map<CxParamType, String> params = createParams();
params.put(CxParamType.BRANCH, "test");

CxScan scanResult = auth.cxScanCreate(params);
assertTrue(auth.cxScanShow(scanResult.getID()).getStatus().equalsIgnoreCase(COMPLETED));
}

@Test
public void cxScanCreationWrongPreset() throws InterruptedException, IOException {
Map<CxParamType, String> params = createParams();
Expand Down

0 comments on commit a40e7de

Please sign in to comment.