Skip to content

Commit

Permalink
FAB-6038 fabric-ca registration test failure
Browse files Browse the repository at this point in the history
This is an invalid test that used an invalid affialiation
during registration. The test has been passing likely because
fabric-ca failed to enforce the affiliation during registration

Change-Id: I20df1d514c95e3ba57d77d60806a384c0b9d2c23
Signed-off-by: Jim Zhang <jzhang@us.ibm.com>
  • Loading branch information
jimthematrix committed Sep 6, 2017
1 parent a7d1e06 commit 98d3063
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/integration/fabric-ca-services-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,13 @@ test('\n\n ** FabricCAServices: Test enroll() With Dynamic CSR **\n\n', function
t.pass('Successfully rejected attempt to register a user of invalid role. ' + err);

return caService.register({enrollmentID: 'auditor', role: 'client', affiliation: 'org2.department1'}, webAdmin);
}).then(() => {
t.fail('Failed to capture the error when registering "auditor" of role "client" from "webAdmin" but using invalid affiliation');
},(err) => {
if (err.toString().indexOf('Registration of \'auditor\' failed in affiliation validation'))
t.pass('Successfully captured the error when registering "auditor" of role "client" from "webAdmin" but using invalid affiliation');

return caService.register({enrollmentID: 'auditor', role: 'client', affiliation: 'org1.department2'}, webAdmin);
}).then(() => {
t.pass('Successfully registered "auditor" of role "client" from "webAdmin"');

Expand Down

0 comments on commit 98d3063

Please sign in to comment.