Skip to content

Commit

Permalink
chore: exclude buggy code test
Browse files Browse the repository at this point in the history
  • Loading branch information
j-luong committed Aug 2, 2024
1 parent ecba03a commit 746c972
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
if: ${{ matrix.os == 'ubuntu' }}
run: mvn -B invoker:install invoker:run
env:
POM_EXCLUDE_CODE_TEST: "test-code-test/pom.xml"
SNYK_TEST_TOKEN: ${{secrets.SNYK_TEST_TOKEN}}
SNYK_CLI_EXECUTABLE: /usr/local/bin/snyk
SNYK_DOWNLOAD_DESTINATION: "downloads/snyk"
Expand All @@ -65,6 +66,7 @@ jobs:
if: ${{ matrix.os == 'macos' }}
run: mvn -B invoker:install invoker:run
env:
POM_EXCLUDE_CODE_TEST: "test-code-test/pom.xml"
SNYK_TEST_TOKEN: ${{secrets.SNYK_TEST_TOKEN}}
SNYK_CLI_EXECUTABLE: /opt/homebrew/bin/snyk
SNYK_DOWNLOAD_DESTINATION: "downloads/snyk"
Expand All @@ -73,6 +75,7 @@ jobs:
if: ${{ matrix.os == 'windows' }}
run: mvn -B invoker:install invoker:run
env:
POM_EXCLUDE_CODE_TEST: "test-code-test/pom.xml"
POM_EXCLUDE_PATTERN: "test-container-test/pom.xml"
SNYK_TEST_TOKEN: ${{secrets.SNYK_TEST_TOKEN}}
SNYK_CLI_EXECUTABLE: "C:\\npm\\prefix\\snyk.cmd"
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@
</pomIncludes>
<pomExcludes>
<pomExclude>${env.POM_EXCLUDE_PATTERN}</pomExclude>
<pomExclude>${env.POM_EXCLUDE_CODE_TEST}</pomExclude>
</pomExcludes>
<preBuildHookScript>setup</preBuildHookScript>
<postBuildHookScript>verify</postBuildHookScript>
Expand Down
10 changes: 5 additions & 5 deletions src/it/test-code-test/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import org.codehaus.plexus.util.FileUtils;

// TODO: debug issue with this test

//String log = FileUtils.fileRead(new File(basedir, "build.log"))
//
//if (!log.contains("SQL Injection")) {
// throw new Exception("no sql injection issue found")
//}
String log = FileUtils.fileRead(new File(basedir, "build.log"))

if (!log.contains("SQL Injection")) {
throw new Exception("no sql injection issue found")
}

return true;

0 comments on commit 746c972

Please sign in to comment.