Browse Source

agent: fewer file local differences between enterprise and oss (#6820) (#6898)

* 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.
pull/6904/head
Hans Hasselberg 5 years ago committed by GitHub
parent
commit
2ad0831b34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      agent/agent.go
  2. 8
      agent/agent_oss.go
  3. 2
      agent/consul/fsm/fsm_test.go
  4. 3
      lib/serf.go

2
agent/agent.go

@ -410,6 +410,8 @@ func (a *Agent) Start() error {
// waiting to discover a consul server
consulCfg.ServerUp = a.sync.SyncFull.Trigger
a.initEnterprise(consulCfg)
tlsConfigurator, err := tlsutil.NewConfigurator(c.ToTLSUtilConfig(), a.logger)
if err != nil {
return err

8
agent/agent_oss.go

@ -0,0 +1,8 @@
// +build !consulent
package agent
import "github.com/hashicorp/consul/agent/consul"
func (a *Agent) initEnterprise(consulCfg *consul.Config) {
}

2
agent/consul/fsm/fsm_test.go

@ -47,7 +47,7 @@ func TestFSM_IgnoreUnknown(t *testing.T) {
Foo string
}
req := UnknownRequest{Foo: "bar"}
msgType := structs.IgnoreUnknownTypeFlag | 64
msgType := structs.IgnoreUnknownTypeFlag | 75
buf, err := structs.Encode(msgType, req)
assert.Nil(t, err)

3
lib/serf.go

@ -1,8 +1,9 @@
package lib
import (
"github.com/hashicorp/serf/serf"
"time"
"github.com/hashicorp/serf/serf"
)
// SerfDefaultConfig returns a Consul-flavored Serf default configuration,

Loading…
Cancel
Save