Skip to content

Commit

Permalink
[FABG-805] MSP tests failing against Fabric 1.4 RC
Browse files Browse the repository at this point in the history
Reproduced and fixed against locally built fabric and
fabric-ca 1.4 RC, in preparation for FABG-804.

Change-Id: I8efd326886cc92c05a984d2c58406bd28f0dfa3e
Signed-off-by: Aleksandar Likic <[email protected]>
  • Loading branch information
Aleksandar Likic committed Jan 4, 2019
1 parent c17b014 commit cb6e8f9
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/integration/pkg/client/msp/enrollment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,16 @@ func TestEnrollWithOptions(t *testing.T) {
t.Fatalf("failed to create CA client: %s", err)
}

// As this integration test spawns a fresh CA instance,
// we have to enroll the CA registrar first. Otherwise,
// CA operations that require the registrar's identity
// will be rejected by the CA.
registrarEnrollID, registrarEnrollSecret := getRegistrarEnrollmentCredentials(t, ctxProvider)
err = mspClient.Enroll(registrarEnrollID, msp.WithSecret(registrarEnrollSecret))
if err != nil {
t.Fatalf("Enroll failed: %s", err)
}

// Generate a random user name
username := integration.GenerateRandomID()

Expand Down Expand Up @@ -209,6 +219,16 @@ func TestEnrollWithProfile(t *testing.T) {
t.Fatalf("failed to create CA client: %s", err)
}

// As this integration test spawns a fresh CA instance,
// we have to enroll the CA registrar first. Otherwise,
// CA operations that require the registrar's identity
// will be rejected by the CA.
registrarEnrollID, registrarEnrollSecret := getRegistrarEnrollmentCredentials(t, ctxProvider)
err = mspClient.Enroll(registrarEnrollID, msp.WithSecret(registrarEnrollSecret))
if err != nil {
t.Fatalf("Enroll failed: %s", err)
}

// Generate a random user name
username := integration.GenerateRandomID()

Expand Down

0 comments on commit cb6e8f9

Please sign in to comment.