Skip to content

Commit

Permalink
tests: exclude learner endpoints from MemberPromote
Browse files Browse the repository at this point in the history
Signed-off-by: Chao Chen <[email protected]>
  • Loading branch information
chaochn47 committed Jul 6, 2023
1 parent e887e52 commit e5f6673
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/e2e/runtime_reconfiguration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,14 @@ func addMember(ctx context.Context, t *testing.T, epc *e2e.EtcdProcessCluster) {
}

func addMemberAsLearnerAndPromote(ctx context.Context, t *testing.T, epc *e2e.EtcdProcessCluster) {
endpoints := epc.EndpointsGRPC()

id, err := epc.StartNewProc(ctx, nil, t, true /* addAsLearner */)
require.NoError(t, err)
newLearnerMemberProc := epc.Procs[len(epc.Procs)-1]
_, err = epc.Etcdctl().MemberPromote(ctx, id)
_, err = epc.Etcdctl(e2e.WithEndpoints(endpoints)).MemberPromote(ctx, id)
require.NoError(t, err)

newLearnerMemberProc := epc.Procs[len(epc.Procs)-1]
require.NoError(t, newLearnerMemberProc.Etcdctl().Health(ctx))
}

Expand Down

0 comments on commit e5f6673

Please sign in to comment.