[xmlsectool] branch maint-2 updated: Add diagnostics to failing test

Ian Young ian at iay.org.uk
Thu Apr 16 05:44:58 EDT 2020


This is an automated email from the git hooks/post-receive script.

iay pushed a commit to branch maint-2
in repository xmlsectool.

View the commit online:
http://git.shibboleth.net/view/?p=xmlsectool.git;a=commit;h=91e254f0e98fd4ce517cb049693f4a3bafcebd4b

The following commit(s) were added to refs/heads/maint-2 by this push:
       new  91e254f   Add diagnostics to failing test
91e254f is described below

commit 91e254f0e98fd4ce517cb049693f4a3bafcebd4b
Author: Ian Young <ian at iay.org.uk>
AuthorDate: Thu Apr 16 10:44:53 2020 +0100

    Add diagnostics to failing test
---
 .../java/net/shibboleth/tool/xmlsectool/XSTJ51Test.java  | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/src/test/java/net/shibboleth/tool/xmlsectool/XSTJ51Test.java b/src/test/java/net/shibboleth/tool/xmlsectool/XSTJ51Test.java
index 7377d20..c258114 100644
--- a/src/test/java/net/shibboleth/tool/xmlsectool/XSTJ51Test.java
+++ b/src/test/java/net/shibboleth/tool/xmlsectool/XSTJ51Test.java
@@ -67,12 +67,20 @@ public class XSTJ51Test extends BaseTest {
 
         // acquire a document to sign
         final Document xml = readXMLDocument("in.xml");
-        
+
         // perform signature operation
-        XMLSecTool.sign(cli, cred, xml);
-        
+        try {
+            XMLSecTool.sign(cli, cred, xml);
+        } catch (final Terminator term) {
+            Assert.fail("sign method threw Terminator: " + term.getExitCode());
+        }
+
         // verify the signature using our own code for consistency
-        XMLSecTool.verifySignature(cli, cred, xml);
+        try {
+            XMLSecTool.verifySignature(cli, cred, xml);
+        } catch (final Terminator term) {
+            Assert.fail("verifySignature method threw Terminator: " + term.getExitCode());
+        }
 
         // take a careful look at the signature
         final Element signatureElement = XMLSecTool.getSignatureElement(xml);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list