mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
test: Always run server with grpc enabled
This commit is contained in:
parent
51f72915e4
commit
de30257d79
@ -139,8 +139,6 @@ type ClusterConfig struct {
|
|||||||
|
|
||||||
AuthToken string
|
AuthToken string
|
||||||
|
|
||||||
UseGRPC bool
|
|
||||||
|
|
||||||
QuotaBackendBytes int64
|
QuotaBackendBytes int64
|
||||||
|
|
||||||
MaxTxnOps uint
|
MaxTxnOps uint
|
||||||
@ -319,7 +317,6 @@ func (c *Cluster) mustNewMember(t testutil.TB) *Member {
|
|||||||
WatchProgressNotifyInterval: c.Cfg.WatchProgressNotifyInterval,
|
WatchProgressNotifyInterval: c.Cfg.WatchProgressNotifyInterval,
|
||||||
ExperimentalMaxLearners: c.Cfg.ExperimentalMaxLearners,
|
ExperimentalMaxLearners: c.Cfg.ExperimentalMaxLearners,
|
||||||
StrictReconfigCheck: c.Cfg.StrictReconfigCheck,
|
StrictReconfigCheck: c.Cfg.StrictReconfigCheck,
|
||||||
UseGRPC: c.Cfg.UseGRPC,
|
|
||||||
})
|
})
|
||||||
m.DiscoveryURL = c.Cfg.DiscoveryURL
|
m.DiscoveryURL = c.Cfg.DiscoveryURL
|
||||||
return m
|
return m
|
||||||
@ -628,7 +625,6 @@ type MemberConfig struct {
|
|||||||
WatchProgressNotifyInterval time.Duration
|
WatchProgressNotifyInterval time.Duration
|
||||||
ExperimentalMaxLearners int
|
ExperimentalMaxLearners int
|
||||||
StrictReconfigCheck bool
|
StrictReconfigCheck bool
|
||||||
UseGRPC bool
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// MustNewMember return an inited member with the given name. If peerTLS is
|
// MustNewMember return an inited member with the given name. If peerTLS is
|
||||||
@ -741,10 +737,8 @@ func MustNewMember(t testutil.TB, mcfg MemberConfig) *Member {
|
|||||||
m.GrpcServerRecorder = &grpc_testing.GrpcRecorder{}
|
m.GrpcServerRecorder = &grpc_testing.GrpcRecorder{}
|
||||||
m.Logger = memberLogger(t, mcfg.Name)
|
m.Logger = memberLogger(t, mcfg.Name)
|
||||||
m.StrictReconfigCheck = mcfg.StrictReconfigCheck
|
m.StrictReconfigCheck = mcfg.StrictReconfigCheck
|
||||||
if mcfg.UseGRPC {
|
if err := m.listenGRPC(); err != nil {
|
||||||
if err := m.listenGRPC(); err != nil {
|
t.Fatal(err)
|
||||||
t.Fatal(err)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
t.Cleanup(func() {
|
t.Cleanup(func() {
|
||||||
// if we didn't cleanup the logger, the consecutive test
|
// if we didn't cleanup the logger, the consecutive test
|
||||||
@ -1403,8 +1397,6 @@ func NewClusterV3(t testutil.TB, cfg *ClusterConfig) *ClusterV3 {
|
|||||||
|
|
||||||
assertInTestContext(t)
|
assertInTestContext(t)
|
||||||
|
|
||||||
cfg.UseGRPC = true
|
|
||||||
|
|
||||||
clus := &ClusterV3{
|
clus := &ClusterV3{
|
||||||
Cluster: newClusterFromConfig(t, cfg),
|
Cluster: newClusterFromConfig(t, cfg),
|
||||||
}
|
}
|
||||||
|
@ -162,7 +162,7 @@ func testDecreaseClusterSize(t *testing.T, size int) {
|
|||||||
|
|
||||||
func TestForceNewCluster(t *testing.T) {
|
func TestForceNewCluster(t *testing.T) {
|
||||||
integration.BeforeTest(t)
|
integration.BeforeTest(t)
|
||||||
c := integration.NewClusterV3(t, &integration.ClusterConfig{Size: 3, UseBridge: true, UseGRPC: true})
|
c := integration.NewClusterV3(t, &integration.ClusterConfig{Size: 3, UseBridge: true})
|
||||||
cc := integration.MustNewHTTPClient(t, []string{c.Members[0].URL()}, nil)
|
cc := integration.MustNewHTTPClient(t, []string{c.Members[0].URL()}, nil)
|
||||||
kapi := client.NewKeysAPI(cc)
|
kapi := client.NewKeysAPI(cc)
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), integration.RequestTimeout)
|
ctx, cancel := context.WithTimeout(context.Background(), integration.RequestTimeout)
|
||||||
|
@ -1550,12 +1550,6 @@ func TestV3RangeRequest(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func newClusterV3NoClients(t *testing.T, cfg *integration.ClusterConfig) *integration.ClusterV3 {
|
|
||||||
cfg.UseGRPC = true
|
|
||||||
clus := integration.NewClusterV3(t, cfg)
|
|
||||||
return clus
|
|
||||||
}
|
|
||||||
|
|
||||||
// TestTLSGRPCRejectInsecureClient checks that connection is rejected if server is TLS but not client.
|
// TestTLSGRPCRejectInsecureClient checks that connection is rejected if server is TLS but not client.
|
||||||
func TestTLSGRPCRejectInsecureClient(t *testing.T) {
|
func TestTLSGRPCRejectInsecureClient(t *testing.T) {
|
||||||
integration.BeforeTest(t)
|
integration.BeforeTest(t)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user