Search in sources :

Example 6 with MockHFCAClient

use of org.hyperledger.fabric_ca.sdk.MockHFCAClient in project fabric-sdk-java by hyperledger.

the class HFCAClientIT method testMockReenrollNoCert.

@Ignore
@Test
public void testMockReenrollNoCert() throws Exception {
    thrown.expect(EnrollmentException.class);
    thrown.expectMessage("failed re-enrollment for user");
    MockHFCAClient mockClient = MockHFCAClient.createNewInstance(testConfig.getIntegrationTestsSampleOrg(TEST_WITH_INTEGRATION_ORG).getCALocation(), testConfig.getIntegrationTestsSampleOrg(TEST_WITH_INTEGRATION_ORG).getCAProperties());
    mockClient.setCryptoSuite(crypto);
    SampleUser user = getEnrolledUser(TEST_ADMIN_ORG);
    mockClient.setHttpPostResponse("{\"success\":true}");
    mockClient.reenroll(user);
}
Also used : MockHFCAClient(org.hyperledger.fabric_ca.sdk.MockHFCAClient) SampleUser(org.hyperledger.fabric.sdkintegration.SampleUser) Ignore(org.junit.Ignore) Test(org.junit.Test)

Aggregations

SampleUser (org.hyperledger.fabric.sdkintegration.SampleUser)6 MockHFCAClient (org.hyperledger.fabric_ca.sdk.MockHFCAClient)6 Test (org.junit.Test)6 Ignore (org.junit.Ignore)2