diff --git a/tests/functional/agent/handler.go b/tests/functional/agent/handler.go index 27bef7dca..761964495 100644 --- a/tests/functional/agent/handler.go +++ b/tests/functional/agent/handler.go @@ -25,7 +25,7 @@ import ( "syscall" "time" - "go.etcd.io/etcd/v3/functional/rpcpb" + "go.etcd.io/etcd/tests/v3/functional/rpcpb" "go.etcd.io/etcd/v3/pkg/fileutil" "go.etcd.io/etcd/v3/pkg/proxy" diff --git a/tests/functional/agent/server.go b/tests/functional/agent/server.go index 26e86195a..ad38cf2e3 100644 --- a/tests/functional/agent/server.go +++ b/tests/functional/agent/server.go @@ -21,8 +21,8 @@ import ( "os/exec" "strings" + "go.etcd.io/etcd/tests/v3/functional/rpcpb" "go.etcd.io/etcd/v3/embed" - "go.etcd.io/etcd/v3/functional/rpcpb" "go.etcd.io/etcd/v3/pkg/proxy" "go.uber.org/zap" diff --git a/tests/functional/cmd/etcd-agent/main.go b/tests/functional/cmd/etcd-agent/main.go index 2ccdcaa07..d70f9b85a 100644 --- a/tests/functional/cmd/etcd-agent/main.go +++ b/tests/functional/cmd/etcd-agent/main.go @@ -18,7 +18,7 @@ package main import ( "flag" - "go.etcd.io/etcd/v3/functional/agent" + "go.etcd.io/etcd/tests/v3/functional/agent" "go.uber.org/zap" ) diff --git a/tests/functional/cmd/etcd-runner/main.go b/tests/functional/cmd/etcd-runner/main.go index d776bd01d..3afe40e1f 100644 --- a/tests/functional/cmd/etcd-runner/main.go +++ b/tests/functional/cmd/etcd-runner/main.go @@ -16,7 +16,7 @@ // against a fault injected cluster. package main -import "go.etcd.io/etcd/v3/functional/runner" +import "go.etcd.io/etcd/tests/v3/functional/runner" func main() { runner.Start() diff --git a/tests/functional/cmd/etcd-tester/main.go b/tests/functional/cmd/etcd-tester/main.go index 8f646adb4..c480076cb 100644 --- a/tests/functional/cmd/etcd-tester/main.go +++ b/tests/functional/cmd/etcd-tester/main.go @@ -19,7 +19,7 @@ import ( "flag" _ "github.com/etcd-io/gofail/runtime" - "go.etcd.io/etcd/v3/functional/tester" + "go.etcd.io/etcd/tests/v3/functional/tester" "go.uber.org/zap" ) diff --git a/tests/functional/tester/case.go b/tests/functional/tester/case.go index 739749775..12c71559e 100644 --- a/tests/functional/tester/case.go +++ b/tests/functional/tester/case.go @@ -19,7 +19,7 @@ import ( "math/rand" "time" - "go.etcd.io/etcd/v3/functional/rpcpb" + "go.etcd.io/etcd/tests/v3/functional/rpcpb" "go.uber.org/zap" ) diff --git a/tests/functional/tester/case_external.go b/tests/functional/tester/case_external.go index a4e1c8846..cf4ee10bf 100644 --- a/tests/functional/tester/case_external.go +++ b/tests/functional/tester/case_external.go @@ -18,7 +18,7 @@ import ( "fmt" "os/exec" - "go.etcd.io/etcd/v3/functional/rpcpb" + "go.etcd.io/etcd/tests/v3/functional/rpcpb" ) type caseExternal struct { diff --git a/tests/functional/tester/case_failpoints.go b/tests/functional/tester/case_failpoints.go index 33b0ceeec..f0508666b 100644 --- a/tests/functional/tester/case_failpoints.go +++ b/tests/functional/tester/case_failpoints.go @@ -21,7 +21,7 @@ import ( "strings" "sync" - "go.etcd.io/etcd/v3/functional/rpcpb" + "go.etcd.io/etcd/tests/v3/functional/rpcpb" ) type failpointStats struct { diff --git a/tests/functional/tester/case_network_blackhole.go b/tests/functional/tester/case_network_blackhole.go index d9f056291..3b0602050 100644 --- a/tests/functional/tester/case_network_blackhole.go +++ b/tests/functional/tester/case_network_blackhole.go @@ -14,7 +14,7 @@ package tester -import "go.etcd.io/etcd/v3/functional/rpcpb" +import "go.etcd.io/etcd/tests/v3/functional/rpcpb" func inject_BLACKHOLE_PEER_PORT_TX_RX(clus *Cluster, idx int) error { return clus.sendOp(idx, rpcpb.Operation_BLACKHOLE_PEER_PORT_TX_RX) diff --git a/tests/functional/tester/case_network_delay.go b/tests/functional/tester/case_network_delay.go index 0eabe1621..bedcd9e4f 100644 --- a/tests/functional/tester/case_network_delay.go +++ b/tests/functional/tester/case_network_delay.go @@ -17,7 +17,7 @@ package tester import ( "time" - "go.etcd.io/etcd/v3/functional/rpcpb" + "go.etcd.io/etcd/tests/v3/functional/rpcpb" "go.uber.org/zap" ) diff --git a/tests/functional/tester/case_no_fail.go b/tests/functional/tester/case_no_fail.go index 726a6a335..16c6371d7 100644 --- a/tests/functional/tester/case_no_fail.go +++ b/tests/functional/tester/case_no_fail.go @@ -17,7 +17,7 @@ package tester import ( "time" - "go.etcd.io/etcd/v3/functional/rpcpb" + "go.etcd.io/etcd/tests/v3/functional/rpcpb" "go.uber.org/zap" ) diff --git a/tests/functional/tester/case_sigquit_remove.go b/tests/functional/tester/case_sigquit_remove.go index c201cc2dc..e1cf5ca95 100644 --- a/tests/functional/tester/case_sigquit_remove.go +++ b/tests/functional/tester/case_sigquit_remove.go @@ -21,8 +21,8 @@ import ( "strings" "time" + "go.etcd.io/etcd/tests/v3/functional/rpcpb" "go.etcd.io/etcd/v3/clientv3" - "go.etcd.io/etcd/v3/functional/rpcpb" "go.uber.org/zap" ) diff --git a/tests/functional/tester/case_sigquit_remove_quorum.go b/tests/functional/tester/case_sigquit_remove_quorum.go index 47117902c..545be7f75 100644 --- a/tests/functional/tester/case_sigquit_remove_quorum.go +++ b/tests/functional/tester/case_sigquit_remove_quorum.go @@ -20,8 +20,8 @@ import ( "strings" "time" + "go.etcd.io/etcd/tests/v3/functional/rpcpb" "go.etcd.io/etcd/v3/clientv3" - "go.etcd.io/etcd/v3/functional/rpcpb" "go.uber.org/zap" ) diff --git a/tests/functional/tester/case_sigterm.go b/tests/functional/tester/case_sigterm.go index 5c96a4608..49b20a000 100644 --- a/tests/functional/tester/case_sigterm.go +++ b/tests/functional/tester/case_sigterm.go @@ -14,7 +14,7 @@ package tester -import "go.etcd.io/etcd/v3/functional/rpcpb" +import "go.etcd.io/etcd/tests/v3/functional/rpcpb" func inject_SIGTERM_ETCD(clus *Cluster, idx int) error { return clus.sendOp(idx, rpcpb.Operation_SIGTERM_ETCD) diff --git a/tests/functional/tester/checker.go b/tests/functional/tester/checker.go index 3ee78f935..f6f217616 100644 --- a/tests/functional/tester/checker.go +++ b/tests/functional/tester/checker.go @@ -14,7 +14,7 @@ package tester -import "go.etcd.io/etcd/v3/functional/rpcpb" +import "go.etcd.io/etcd/tests/v3/functional/rpcpb" // Checker checks cluster consistency. type Checker interface { diff --git a/tests/functional/tester/checker_kv_hash.go b/tests/functional/tester/checker_kv_hash.go index 534f90fa9..cd42f7274 100644 --- a/tests/functional/tester/checker_kv_hash.go +++ b/tests/functional/tester/checker_kv_hash.go @@ -18,7 +18,7 @@ import ( "fmt" "time" - "go.etcd.io/etcd/v3/functional/rpcpb" + "go.etcd.io/etcd/tests/v3/functional/rpcpb" "go.uber.org/zap" ) diff --git a/tests/functional/tester/checker_lease_expire.go b/tests/functional/tester/checker_lease_expire.go index 524977df5..edd03bfe8 100644 --- a/tests/functional/tester/checker_lease_expire.go +++ b/tests/functional/tester/checker_lease_expire.go @@ -20,8 +20,8 @@ import ( "time" "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" + "go.etcd.io/etcd/tests/v3/functional/rpcpb" "go.etcd.io/etcd/v3/clientv3" - "go.etcd.io/etcd/v3/functional/rpcpb" "go.uber.org/zap" "google.golang.org/grpc" diff --git a/tests/functional/tester/checker_no_check.go b/tests/functional/tester/checker_no_check.go index 7697aac85..b0aef6e21 100644 --- a/tests/functional/tester/checker_no_check.go +++ b/tests/functional/tester/checker_no_check.go @@ -14,7 +14,7 @@ package tester -import "go.etcd.io/etcd/v3/functional/rpcpb" +import "go.etcd.io/etcd/tests/v3/functional/rpcpb" type noCheck struct{} diff --git a/tests/functional/tester/checker_runner.go b/tests/functional/tester/checker_runner.go index 42f6160a0..944ecc6a3 100644 --- a/tests/functional/tester/checker_runner.go +++ b/tests/functional/tester/checker_runner.go @@ -14,7 +14,7 @@ package tester -import "go.etcd.io/etcd/v3/functional/rpcpb" +import "go.etcd.io/etcd/tests/v3/functional/rpcpb" type runnerChecker struct { ctype rpcpb.Checker diff --git a/tests/functional/tester/cluster.go b/tests/functional/tester/cluster.go index f9d0e27c9..0a69cb294 100644 --- a/tests/functional/tester/cluster.go +++ b/tests/functional/tester/cluster.go @@ -29,7 +29,7 @@ import ( "sync" "time" - "go.etcd.io/etcd/v3/functional/rpcpb" + "go.etcd.io/etcd/tests/v3/functional/rpcpb" "go.etcd.io/etcd/v3/pkg/debugutil" "go.etcd.io/etcd/v3/pkg/fileutil" diff --git a/tests/functional/tester/cluster_read_config.go b/tests/functional/tester/cluster_read_config.go index bd181a386..d9a5cf058 100644 --- a/tests/functional/tester/cluster_read_config.go +++ b/tests/functional/tester/cluster_read_config.go @@ -22,7 +22,7 @@ import ( "path/filepath" "strings" - "go.etcd.io/etcd/v3/functional/rpcpb" + "go.etcd.io/etcd/tests/v3/functional/rpcpb" "go.uber.org/zap" yaml "gopkg.in/yaml.v2" diff --git a/tests/functional/tester/cluster_run.go b/tests/functional/tester/cluster_run.go index ccbf14ecf..74cca6ddd 100644 --- a/tests/functional/tester/cluster_run.go +++ b/tests/functional/tester/cluster_run.go @@ -19,7 +19,7 @@ import ( "os" "time" - "go.etcd.io/etcd/v3/functional/rpcpb" + "go.etcd.io/etcd/tests/v3/functional/rpcpb" "go.etcd.io/etcd/v3/pkg/fileutil" "go.uber.org/zap" diff --git a/tests/functional/tester/cluster_test.go b/tests/functional/tester/cluster_test.go index 93db53e13..f1b7392c9 100644 --- a/tests/functional/tester/cluster_test.go +++ b/tests/functional/tester/cluster_test.go @@ -19,7 +19,7 @@ import ( "sort" "testing" - "go.etcd.io/etcd/v3/functional/rpcpb" + "go.etcd.io/etcd/tests/v3/functional/rpcpb" "go.uber.org/zap" ) @@ -262,7 +262,7 @@ func Test_read(t *testing.T) { } defer logger.Sync() - cfg, err := read(logger, "../../functional.yaml") + cfg, err := read(logger, "../functional.yaml") if err != nil { t.Fatal(err) } diff --git a/tests/functional/tester/stresser.go b/tests/functional/tester/stresser.go index 79e6687f4..f147c6cee 100644 --- a/tests/functional/tester/stresser.go +++ b/tests/functional/tester/stresser.go @@ -18,7 +18,7 @@ import ( "fmt" "time" - "go.etcd.io/etcd/v3/functional/rpcpb" + "go.etcd.io/etcd/tests/v3/functional/rpcpb" "go.uber.org/zap" ) diff --git a/tests/functional/tester/stresser_key.go b/tests/functional/tester/stresser_key.go index 402a1aef9..99ba75834 100644 --- a/tests/functional/tester/stresser_key.go +++ b/tests/functional/tester/stresser_key.go @@ -24,9 +24,9 @@ import ( "time" "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" + "go.etcd.io/etcd/tests/v3/functional/rpcpb" "go.etcd.io/etcd/v3/clientv3" "go.etcd.io/etcd/v3/etcdserver" - "go.etcd.io/etcd/v3/functional/rpcpb" "go.etcd.io/etcd/v3/raft" "go.uber.org/zap" diff --git a/tests/functional/tester/stresser_lease.go b/tests/functional/tester/stresser_lease.go index e046234e8..9fca573c3 100644 --- a/tests/functional/tester/stresser_lease.go +++ b/tests/functional/tester/stresser_lease.go @@ -23,8 +23,8 @@ import ( "time" "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" + "go.etcd.io/etcd/tests/v3/functional/rpcpb" "go.etcd.io/etcd/v3/clientv3" - "go.etcd.io/etcd/v3/functional/rpcpb" "go.uber.org/zap" "golang.org/x/time/rate" diff --git a/tests/functional/tester/stresser_runner.go b/tests/functional/tester/stresser_runner.go index 55f791ddb..ccfdab4df 100644 --- a/tests/functional/tester/stresser_runner.go +++ b/tests/functional/tester/stresser_runner.go @@ -20,7 +20,7 @@ import ( "os/exec" "syscall" - "go.etcd.io/etcd/v3/functional/rpcpb" + "go.etcd.io/etcd/tests/v3/functional/rpcpb" "go.uber.org/zap" "golang.org/x/time/rate" diff --git a/tests/go.mod b/tests/go.mod index 9804ef5a3..2e7041824 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -4,8 +4,22 @@ go 1.15 replace go.etcd.io/etcd/v3 => ../ +replace go.etcd.io/etcd/api/v3 => ../api + require ( + github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4 + github.com/etcd-io/gofail v0.0.0-20190801230047-ad7f989257ca + github.com/gogo/protobuf v1.2.1 + github.com/golang/protobuf v1.3.2 github.com/grpc-ecosystem/grpc-gateway v1.9.5 + github.com/prometheus/client_golang v1.0.0 + github.com/spf13/cobra v0.0.3 + github.com/spf13/pflag v1.0.1 go.etcd.io/bbolt v1.3.5 + go.etcd.io/etcd/api/v3 v3.0.0-00010101000000-000000000000 go.etcd.io/etcd/v3 v3.0.0-00010101000000-000000000000 + go.uber.org/zap v1.15.0 + golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2 + google.golang.org/grpc v1.26.0 + gopkg.in/yaml.v2 v2.2.2 ) diff --git a/tests/go.sum b/tests/go.sum index 1defc7d00..a632cb169 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -26,6 +26,7 @@ github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4 h1:qk/FSDDxo05w github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/etcd-io/gofail v0.0.0-20190801230047-ad7f989257ca h1:Y2I0lxOttdUKz+hNaIdG3FtjuQrTmwXun1opRV65IZc= github.com/etcd-io/gofail v0.0.0-20190801230047-ad7f989257ca/go.mod h1:49H/RkXP8pKaZy4h0d+NW16rSLhyVBt4o6VLJbmOqDE= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -115,6 +116,7 @@ github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4 github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/spf13/cobra v0.0.3 h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/pflag v1.0.1 h1:aCvUg6QPl3ibpQUxyLkrEkCHtPqYJL4x9AuhqVqFis4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=