diff --git a/agent/rpc/subscribe/subscribe_test.go b/agent/rpc/subscribe/subscribe_test.go index 2f2284671..41f335d4a 100644 --- a/agent/rpc/subscribe/subscribe_test.go +++ b/agent/rpc/subscribe/subscribe_test.go @@ -604,10 +604,8 @@ node "node1" { policy = "write" } ` - authorizer, err := acl.NewAuthorizerFromRules( - "1", 0, rules, acl.SyntaxCurrent, - &acl.Config{WildcardName: structs.WildcardSpecifier}, - nil) + cfg := &acl.Config{WildcardName: structs.WildcardSpecifier} + authorizer, err := acl.NewAuthorizerFromRules("1", 0, rules, acl.SyntaxCurrent, cfg, nil) require.NoError(t, err) authorizer = acl.NewChainedAuthorizer([]acl.Authorizer{authorizer, acl.DenyAll()}) require.Equal(t, acl.Deny, authorizer.NodeRead("denied", nil)) diff --git a/agent/structs/structs.go b/agent/structs/structs.go index 0a8d4faee..5e0956a06 100644 --- a/agent/structs/structs.go +++ b/agent/structs/structs.go @@ -1626,7 +1626,6 @@ func (csn *CheckServiceNode) CanRead(authz acl.Authorizer) acl.EnforcementDecisi return acl.Deny } - // TODO(streaming): add enterprise test that uses namespaces authzContext := new(acl.AuthorizerContext) csn.Service.EnterpriseMeta.FillAuthzContext(authzContext) diff --git a/agent/structs/structs_test.go b/agent/structs/structs_test.go index 0b4e9c497..d6d85aee2 100644 --- a/agent/structs/structs_test.go +++ b/agent/structs/structs_test.go @@ -1290,7 +1290,7 @@ func TestCheckServiceNodes_Filter(t *testing.T) { } } -func TestCheckServiceNodes_CanRead(t *testing.T) { +func TestCheckServiceNode_CanRead(t *testing.T) { type testCase struct { name string csn CheckServiceNode