open-consul/agent/consul/acl_oss_test.go
Ronald dd0e8eec14
copyright headers for agent folder (#16704)
* copyright headers for agent folder

* Ignore test data files

* fix proto files and remove headers in agent/uiserver folder

* ignore deep-copy files
2023-03-28 14:39:22 -04:00

44 lines
1.1 KiB
Go

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
//go:build !consulent
// +build !consulent
package consul
import (
"context"
"fmt"
"github.com/hashicorp/consul/acl"
"github.com/hashicorp/consul/agent/structs"
)
func testIdentityForTokenEnterprise(string) (bool, structs.ACLIdentity, error) {
return true, nil, acl.ErrNotFound
}
func testPolicyForIDEnterprise(string) (bool, *structs.ACLPolicy, error) {
return true, nil, acl.ErrNotFound
}
func testRoleForIDEnterprise(string) (bool, *structs.ACLRole, error) {
return true, nil, acl.ErrNotFound
}
// EnterpriseACLResolverTestDelegate stub
type EnterpriseACLResolverTestDelegate struct{}
// RPC stub for the EnterpriseACLResolverTestDelegate
func (d *EnterpriseACLResolverTestDelegate) RPC(context.Context, string, interface{}, interface{}) (bool, error) {
return false, nil
}
func (d *EnterpriseACLResolverTestDelegate) UseTestLocalData(data []interface{}) {
if len(data) > 0 {
panic(fmt.Sprintf("unexpected data type: %T", data[0]))
}
}
func (d *EnterpriseACLResolverTestDelegate) UseDefaultData() {}
func (d *EnterpriseACLResolverTestDelegate) Reset() {}