Skip to content

Commit

Permalink
add WithEndpoints()
Browse files Browse the repository at this point in the history
  • Loading branch information
veshij committed Oct 27, 2022
1 parent 90535ef commit 03a9bc9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/framework/e2e/etcdctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ import (
"strings"
"time"

"google.golang.org/grpc"

"go.etcd.io/etcd/api/v3/authpb"
"go.etcd.io/etcd/api/v3/etcdserverpb"
clientv3 "go.etcd.io/etcd/client/v3"
"go.etcd.io/etcd/tests/v3/framework/config"
"google.golang.org/grpc"
)

type EtcdctlV3 struct {
Expand Down Expand Up @@ -71,6 +72,13 @@ func WithAuth(userName, password string) config.ClientOption {
}
}

func WithEndpoints(endpoints []string) config.ClientOption {
return func(c any) {
ctl := c.(*EtcdctlV3)
ctl.endpoints = endpoints
}
}

func (ctl *EtcdctlV3) DowngradeEnable(ctx context.Context, version string) error {
_, err := SpawnWithExpectLines(ctx, ctl.cmdArgs("downgrade", "enable", version), nil, "Downgrade enable success")
return err
Expand Down

0 comments on commit 03a9bc9

Please sign in to comment.