-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(it): log out command output when it fails
- Loading branch information
Showing
24 changed files
with
61 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,19 +3,19 @@ import org.codehaus.plexus.util.FileUtils; | |
String log = FileUtils.fileRead(new File(basedir, "build.log")); | ||
|
||
if (!log.contains("test-multi-module-child ............................ SUCCESS")) { | ||
throw new Exception("parent should have succeeded."); | ||
throw new Exception("parent should have succeeded. Log output:\n" + log + "\n"); | ||
} | ||
|
||
if (!log.contains("child-module-1 ..................................... SUCCESS")) { | ||
throw new Exception("child-module-1 should have succeeded."); | ||
throw new Exception("child-module-1 should have succeeded. Log output:\n" + log + "\n"); | ||
} | ||
|
||
if (!log.contains("child-module-2 ..................................... FAILURE")) { | ||
throw new Exception("child-module-2 should have failed."); | ||
throw new Exception("child-module-2 should have failed. Log output:\n" + log + "\n"); | ||
} | ||
|
||
if (!log.contains("introduced by axis:[email protected]")) { | ||
throw new Exception("Could not find expected vulnerability in child-module-2."); | ||
throw new Exception("Could not find expected vulnerability in child-module-2. Log output:\n" + log + "\n"); | ||
} | ||
|
||
return true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,31 +3,31 @@ import org.codehaus.plexus.util.FileUtils; | |
String log = FileUtils.fileRead(new File(basedir, "build.log")); | ||
|
||
if (!log.contains("Target file: pom.xml")) { | ||
throw new Exception("parent was not scanned."); | ||
throw new Exception("parent was not scanned. Log output:\n" + log + "\n"); | ||
} | ||
|
||
if (!log.contains("Target file: child-module-1")) { | ||
throw new Exception("child-module-1 was not scanned."); | ||
throw new Exception("child-module-1 was not scanned. Log output:\n" + log + "\n"); | ||
} | ||
|
||
if (!log.contains("Target file: child-module-2")) { | ||
throw new Exception("child-module-2 was not scanned."); | ||
throw new Exception("child-module-2 was not scanned. Log output:\n" + log + "\n"); | ||
} | ||
|
||
if (!log.contains("test-multi-module-parent ........................... FAILURE")) { | ||
throw new Exception("parent should have failed with vulnerabilities, including from children."); | ||
throw new Exception("parent should have failed with vulnerabilities, including from children. Log output:\n" + log + "\n"); | ||
} | ||
|
||
if (!log.contains("child-module-1 ..................................... SKIPPED")) { | ||
throw new Exception("child-module-1 should have been skipped."); | ||
throw new Exception("child-module-1 should have been skipped. Log output:\n" + log + "\n"); | ||
} | ||
|
||
if (!log.contains("child-module-2 ..................................... SKIPPED")) { | ||
throw new Exception("child-module-2 should have been skipped."); | ||
throw new Exception("child-module-2 should have been skipped. Log output:\n" + log + "\n"); | ||
} | ||
|
||
if (!log.contains("introduced by axis:[email protected]")) { | ||
throw new Exception("Could not find vulnerability in parent."); | ||
throw new Exception("Could not find vulnerability in parent. Log output:\n" + log + "\n"); | ||
} | ||
|
||
return true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ import org.codehaus.plexus.util.FileUtils; | |
String log = FileUtils.fileRead(new File(basedir, "build.log")) | ||
|
||
if (!log.contains("introduced by org.postgresql:[email protected]")) { | ||
throw new Exception("Vulnerability in dependency not found") | ||
throw new Exception("Vulnerability in dependency not found. Log output:\n" + log + "\n") | ||
} | ||
|
||
return true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ import org.codehaus.plexus.util.FileUtils; | |
String log = FileUtils.fileRead(new File(basedir, "build.log")); | ||
|
||
if (!log.contains("introduced by axis:[email protected]")) { | ||
throw new Exception("Vulnerability not found."); | ||
throw new Exception("Vulnerability not found. Log output:\n" + log + "\n"); | ||
} | ||
|
||
return true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters