mirror of https://github.com/status-im/consul.git
* Increase number to test ignore. Consul Enterprise has more flags and since we are trying to reduce the differences between both code bases, we are increasing the number in oss. The semantics don't change, it is just a cosmetic thing. * Introduce agent.initEnterprise for enterprise related hooks. * Sync test with ent version. * Fix import order. * revert error wording.
This commit is contained in:
parent
3ea32f8ca0
commit
2ad0831b34
|
@ -410,6 +410,8 @@ func (a *Agent) Start() error {
|
||||||
// waiting to discover a consul server
|
// waiting to discover a consul server
|
||||||
consulCfg.ServerUp = a.sync.SyncFull.Trigger
|
consulCfg.ServerUp = a.sync.SyncFull.Trigger
|
||||||
|
|
||||||
|
a.initEnterprise(consulCfg)
|
||||||
|
|
||||||
tlsConfigurator, err := tlsutil.NewConfigurator(c.ToTLSUtilConfig(), a.logger)
|
tlsConfigurator, err := tlsutil.NewConfigurator(c.ToTLSUtilConfig(), a.logger)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
// +build !consulent
|
||||||
|
|
||||||
|
package agent
|
||||||
|
|
||||||
|
import "github.com/hashicorp/consul/agent/consul"
|
||||||
|
|
||||||
|
func (a *Agent) initEnterprise(consulCfg *consul.Config) {
|
||||||
|
}
|
|
@ -47,7 +47,7 @@ func TestFSM_IgnoreUnknown(t *testing.T) {
|
||||||
Foo string
|
Foo string
|
||||||
}
|
}
|
||||||
req := UnknownRequest{Foo: "bar"}
|
req := UnknownRequest{Foo: "bar"}
|
||||||
msgType := structs.IgnoreUnknownTypeFlag | 64
|
msgType := structs.IgnoreUnknownTypeFlag | 75
|
||||||
buf, err := structs.Encode(msgType, req)
|
buf, err := structs.Encode(msgType, req)
|
||||||
assert.Nil(t, err)
|
assert.Nil(t, err)
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package lib
|
package lib
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/hashicorp/serf/serf"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/hashicorp/serf/serf"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SerfDefaultConfig returns a Consul-flavored Serf default configuration,
|
// SerfDefaultConfig returns a Consul-flavored Serf default configuration,
|
||||||
|
|
Loading…
Reference in New Issue