mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-22 17:45:10 +00:00
[FAB-8633] Correct revoked error check
The returned error message was changed to "access denied" when a certificate has been revoked. This simply changes the sample to look for the correct error message. Change-Id: Id107d4e1813099e2f21ba9eaffa0bd0b9912a97b Signed-off-by: Keith Smith <bksmith@us.ibm.com>
This commit is contained in:
parent
f3b55c9c0d
commit
9f9fc7e5ac
1 changed files with 1 additions and 1 deletions
|
|
@ -174,7 +174,7 @@ function queryAsRevokedUser {
|
||||||
sleep 1
|
sleep 1
|
||||||
peer chaincode query -C $CHANNEL_NAME -n mycc -c '{"Args":["query","a"]}' >& log.txt
|
peer chaincode query -C $CHANNEL_NAME -n mycc -c '{"Args":["query","a"]}' >& log.txt
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
err=$(cat log.txt | grep "The certificate has been revoked")
|
err=$(cat log.txt | grep "access denied")
|
||||||
if [ "$err" != "" ]; then
|
if [ "$err" != "" ]; then
|
||||||
logr "Expected error occurred when the revoked user '$USER_NAME' queried the chaincode in the channel '$CHANNEL_NAME'"
|
logr "Expected error occurred when the revoked user '$USER_NAME' queried the chaincode in the channel '$CHANNEL_NAME'"
|
||||||
set -e
|
set -e
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue