Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clientv3/integration: add member promote failure test cases #10775

Merged

Conversation

jingyih
Copy link
Contributor

@jingyih jingyih commented May 31, 2019

Add 2 failure cases for member promote. "Learner not ready" failure case is already covered in TestMemberPromote[1]. This PR completes all 3 cases mentioned in the doc [2].

cc @xiang90 @WIZARD-CXY @gyuho

Reference:
[1]

// learner is not started yet. Expect learner progress check to fail.
// As the result, member promote request will fail.
_, err = capi.MemberPromote(context.Background(), learnerID)

[2] Doc: Error cases when promoting a learner member

@codecov-io
Copy link

codecov-io commented May 31, 2019

Codecov Report

Merging #10775 into master will increase coverage by 0.2%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #10775     +/-   ##
=========================================
+ Coverage   62.51%   62.72%   +0.2%     
=========================================
  Files         392      392             
  Lines       37157    37157             
=========================================
+ Hits        23230    23305     +75     
+ Misses      12330    12280     -50     
+ Partials     1597     1572     -25
Impacted Files Coverage Δ
client/client.go 48.03% <0%> (-25.5%) ⬇️
auth/jwt.go 44.76% <0%> (-23.81%) ⬇️
client/members.go 65.32% <0%> (-20.17%) ⬇️
auth/store.go 55.09% <0%> (-10.97%) ⬇️
pkg/adt/interval_tree.go 78.07% <0%> (-5.71%) ⬇️
clientv3/leasing/txn.go 88.09% <0%> (-3.18%) ⬇️
proxy/grpcproxy/watch.go 88.55% <0%> (-3.02%) ⬇️
proxy/httpproxy/director.go 77.14% <0%> (-2.86%) ⬇️
etcdserver/api/rafthttp/msgappv2_codec.go 69.56% <0%> (-1.74%) ⬇️
lease/leasehttp/http.go 62.77% <0%> (-1.46%) ⬇️
... and 29 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2f7121b...ec17872. Read the comment docs.

@@ -24,6 +24,7 @@ import (
"go.etcd.io/etcd/integration"
"go.etcd.io/etcd/pkg/testutil"
"go.etcd.io/etcd/pkg/types"
"math/rand"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move to line 23

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Fixed.

@xiang90
Copy link
Contributor

xiang90 commented May 31, 2019

lgtm

Add TestMemberPromoteMemberNotLearner and
TestMemberPromoteMemberNotExist.
@jingyih jingyih force-pushed the integration_member_promote_failed_cases branch from c80a04b to ec17872 Compare May 31, 2019 17:53
@WIZARD-CXY
Copy link
Contributor

lgtm

@xiang90 xiang90 merged commit ea0f919 into etcd-io:master Jun 3, 2019
@jingyih jingyih deleted the integration_member_promote_failed_cases branch September 7, 2019 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants