@@ -45,16 +45,16 @@ echo Vendor B DID: $VENDOR_B_DID
45
45
46
46
# Issue NutsOrganizationCredential for Vendor B
47
47
REQUEST=" {\" type\" :\" NutsOrganizationCredential\" ,\" issuer\" :\" ${VENDOR_B_DID} \" , \" credentialSubject\" : {\" id\" :\" ${VENDOR_B_DID} \" , \" organization\" :{\" name\" :\" Caresoft B.V.\" , \" city\" :\" Caretown\" }},\" withStatusList2021Revocation\" : true}"
48
- RESPONSE =$( echo $REQUEST | curl -X POST --data-binary @- http://localhost:28081/internal/vcr/v2/issuer/vc -H " Content-Type:application/json" )
49
- if echo $RESPONSE | grep -q " VerifiableCredential" ; then
48
+ VENDOR_B_CREDENTIAL =$( echo $REQUEST | curl -X POST --data-binary @- http://localhost:28081/internal/vcr/v2/issuer/vc -H " Content-Type:application/json" )
49
+ if echo $VENDOR_B_CREDENTIAL | grep -q " VerifiableCredential" ; then
50
50
echo " VC issued"
51
51
else
52
52
echo " FAILED: Could not issue NutsOrganizationCredential to node-B" 1>&2
53
- echo $RESPONSE
53
+ echo $VENDOR_B_CREDENTIAL
54
54
exitWithDockerLogs 1
55
55
fi
56
56
57
- RESPONSE=$( echo $RESPONSE | curl -X POST --data-binary @- http://localhost:28081/internal/vcr/v2/holder/vendorB/vc -H " Content-Type:application/json" )
57
+ RESPONSE=$( echo $VENDOR_B_CREDENTIAL | curl -X POST --data-binary @- http://localhost:28081/internal/vcr/v2/holder/vendorB/vc -H " Content-Type:application/json" )
58
58
if echo $RESPONSE == " " ; then
59
59
echo " VC stored in wallet"
60
60
else
63
63
exitWithDockerLogs 1
64
64
fi
65
65
66
+ # Test regression for https://github.com/nuts-foundation/nuts-node/issues/3451
67
+ # (VCR: Status List can't be retrieved when using MS SQL Server)
68
+ # Get credential status URL from credentialStatus.statusListCredential property using jq
69
+ STATUS_LIST_CREDENTIAL=$( echo $VENDOR_B_CREDENTIAL | jq -r .credentialStatus.statusListCredential)
70
+ echo " Status list credential: $STATUS_LIST_CREDENTIAL "
71
+ # Get status list credential
72
+ RESPONSE=$( $db_dc exec nodeB-backend curl -s -k $STATUS_LIST_CREDENTIAL )
73
+ # Check response HTTP 200 OK
74
+ if [ $? -eq 0 ]; then
75
+ echo " Status list credential retrieved"
76
+ else
77
+ echo " FAILED: Could not retrieve status list credential" 1>&2
78
+ echo $RESPONSE
79
+ exitWithDockerLogs 1
80
+ fi
81
+
66
82
# Register vendor B on Discovery Service
67
83
echo " Registering vendor B on Discovery Service..."
68
84
REQUEST=" {\" registrationParameters\" :{\" key\" :\" value\" }}"
167
183
exitWithDockerLogs 1
168
184
fi
169
185
170
-
171
-
172
186
echo " ------------------------------------"
173
187
echo " Retrieving data..."
174
188
echo " ------------------------------------"
0 commit comments