diff --git a/agent/consul/acl_test.go b/agent/consul/acl_test.go index 68e03610df..cd3604e108 100644 --- a/agent/consul/acl_test.go +++ b/agent/consul/acl_test.go @@ -214,7 +214,6 @@ func (d *ACLResolverTestDelegate) RPC(method string, args interface{}, reply int panic("Bad Test Implmentation: should provide a policyResolveFn to the ACLResolverTestDelegate") } panic("Bad Test Implementation: Was the ACLResolver updated to use new RPC methods") - return nil } func newTestACLResolver(t *testing.T, delegate ACLResolverDelegate, cb func(*ACLResolverConfig)) *ACLResolver { diff --git a/agent/consul/fsm/snapshot_oss.go b/agent/consul/fsm/snapshot_oss.go index c03d82bede..3650add7ae 100644 --- a/agent/consul/fsm/snapshot_oss.go +++ b/agent/consul/fsm/snapshot_oss.go @@ -446,7 +446,7 @@ func restoreACLBootstrap(header *snapshotHeader, restore *state.Restore, decoder // With V2 ACLs whether bootstrapping has been performed is stored in the index table like nomad // so this "restores" into that index table. - return restore.IndexRestore(&state.IndexEntry{"acl-token-bootstrap", req.ModifyIndex}) + return restore.IndexRestore(&state.IndexEntry{Key: "acl-token-bootstrap", Value: req.ModifyIndex}) } func restoreCoordinates(header *snapshotHeader, restore *state.Restore, decoder *codec.Decoder) error { diff --git a/agent/consul/state/acl.go b/agent/consul/state/acl.go index 5ef43b80cb..aab3362430 100644 --- a/agent/consul/state/acl.go +++ b/agent/consul/state/acl.go @@ -210,7 +210,7 @@ func (s *Store) ACLBootstrap(idx, resetIndex uint64, token *structs.ACLToken, le // We must have initialized before this will ever be possible. existing, err := tx.First("index", "id", "acl-token-bootstrap") if err != nil { - fmt.Errorf("bootstrap check failed: %v", err) + return fmt.Errorf("bootstrap check failed: %v", err) } if existing != nil { if resetIndex == 0 { diff --git a/testutil/server.go b/testutil/server.go index 3ff72639b0..db76c8ae67 100644 --- a/testutil/server.go +++ b/testutil/server.go @@ -89,7 +89,7 @@ type TestServerConfig struct { PrimaryDatacenter string `json:"primary_datacenter,omitempty"` ACLDefaultPolicy string `json:"acl_default_policy,omitempty"` ACLEnforceVersion8 bool `json:"acl_enforce_version_8"` - ACL TestACLs `json:"acl",omitempty` + ACL TestACLs `json:"acl,omitempty"` Encrypt string `json:"encrypt,omitempty"` CAFile string `json:"ca_file,omitempty"` CertFile string `json:"cert_file,omitempty"`