integration: add quota backend bytes option
This commit is contained in:
@ -73,6 +73,7 @@ type ClusterConfig struct {
|
|||||||
ClientTLS *transport.TLSInfo
|
ClientTLS *transport.TLSInfo
|
||||||
DiscoveryURL string
|
DiscoveryURL string
|
||||||
UseGRPC bool
|
UseGRPC bool
|
||||||
|
QuotaBackendBytes int64
|
||||||
}
|
}
|
||||||
|
|
||||||
type cluster struct {
|
type cluster struct {
|
||||||
@ -196,7 +197,7 @@ func (c *cluster) HTTPMembers() []client.Member {
|
|||||||
|
|
||||||
func (c *cluster) mustNewMember(t *testing.T) *member {
|
func (c *cluster) mustNewMember(t *testing.T) *member {
|
||||||
name := c.name(rand.Int())
|
name := c.name(rand.Int())
|
||||||
m := mustNewMember(t, name, c.cfg.PeerTLS, c.cfg.ClientTLS)
|
m := mustNewMember(t, name, c.cfg.PeerTLS, c.cfg.ClientTLS, c.cfg.QuotaBackendBytes)
|
||||||
m.DiscoveryURL = c.cfg.DiscoveryURL
|
m.DiscoveryURL = c.cfg.DiscoveryURL
|
||||||
if c.cfg.UseGRPC {
|
if c.cfg.UseGRPC {
|
||||||
if err := m.listenGRPC(); err != nil {
|
if err := m.listenGRPC(); err != nil {
|
||||||
@ -417,7 +418,7 @@ type member struct {
|
|||||||
|
|
||||||
// mustNewMember return an inited member with the given name. If peerTLS is
|
// mustNewMember return an inited member with the given name. If peerTLS is
|
||||||
// set, it will use https scheme to communicate between peers.
|
// set, it will use https scheme to communicate between peers.
|
||||||
func mustNewMember(t *testing.T, name string, peerTLS *transport.TLSInfo, clientTLS *transport.TLSInfo) *member {
|
func mustNewMember(t *testing.T, name string, peerTLS *transport.TLSInfo, clientTLS *transport.TLSInfo, quotaBackendBytes int64) *member {
|
||||||
var err error
|
var err error
|
||||||
m := &member{}
|
m := &member{}
|
||||||
|
|
||||||
@ -464,6 +465,7 @@ func mustNewMember(t *testing.T, name string, peerTLS *transport.TLSInfo, client
|
|||||||
}
|
}
|
||||||
m.ElectionTicks = electionTicks
|
m.ElectionTicks = electionTicks
|
||||||
m.TickMs = uint(tickDuration / time.Millisecond)
|
m.TickMs = uint(tickDuration / time.Millisecond)
|
||||||
|
m.QuotaBackendBytes = quotaBackendBytes
|
||||||
return m
|
return m
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user