Skip to content

Commit 151f76e

Browse files
committed
[FAB-13167] IdemixBridgeTest Robustification
This change-set updates the tests to always correctly invalidate a credential in a bad path test. Change-Id: I3a0eda33bf1158d7a1cf8a3ddd7dc4c4af5548dd Signed-off-by: Angelo De Caro <adc@zurich.ibm.com>
1 parent f63c95d commit 151f76e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

bccsp/idemix/bridge/bridge_test.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,13 @@ var _ = Describe("Idemix Bridge", func() {
849849
})
850850

851851
It("invalid credential", func() {
852-
credential[4] = 0
852+
// Invalidate credential by changing it in one position
853+
if credential[4] == 0 {
854+
credential[4] = 1
855+
} else {
856+
credential[4] = 0
857+
}
858+
853859
// Verify Credential
854860
valid, err := CredentialVerifier.Verify(
855861
UserKey,

0 commit comments

Comments
 (0)