Documentation
¶
Index ¶
- Constants
- func FakeAPBinding() *apbindingpb.APBinding
- func FakeAgent() *agentpb.Agent
- func FakeAttestationPolicy() *attestationpolicypb.AttestationPolicy
- func FakeBundle() *types.Bundle
- func FakeCluster() *clusterpb.Cluster
- func FakeFederatedService() *federatedservicepb.FederatedService
- func FakeIdentity() *identitypb.Identity
- func FakeK8sPodWorkload() *workloadpb.Workload
- func FakeOrganization() *organizationpb.Organization
- func FakeTrustZone() *trustzonepb.TrustZone
- func PtrOf[T any](val T) *T
- func RequireUnimplemented(t *testing.T, err error)
- type TestServer
Constants ¶
View Source
const ( FakeOrganizationID = "fake-org-id" FakeOrganizationName = "fake-org-name" FakeTrustZoneID = "fake-tz-id" FakeTrustZoneName = "fake-tz-name" FakeTrustDomain = "fake.trust.domain" FakeClusterID = "fake-cluster-id" FakeClusterName = "fake-cluster-name" FakeAgentToken = "fake-agent-token" FakeAgentID = "fake-agent-id" FakeFSID = "fake-fs-id" FakeFSName = "fake-fs-name" FakeAttestationPolicyID = "fake-ap-id" FakeAttestationPolicyName = "fake-ap-name" FakeAPBindingID = "fake-ap-binding-id" FakeWorkloadID = "fake-workload-id" FakeK8sPodUID = "fake-k8s-pod-uid" FakeK8sPodName = "fake-k8s-pod-name" FakeK8sPodNamespace = "fake-k8s-pod-namespace" FakeIdentityID = "fake-identity-id" FakeSPIFFEID = "spiffe://fake.trust.domain/ns/fake-k8s-pod-namespace/sa/fake-k8s-pod-service-account" FakeParentID = "spiffe://fake.trust.domain/spire/agent/k8s_psat/fake-cluster-name/fake-spire-agent" FakeSelectorType = "fake-selector-type" FakeSelectorValue = "fake-selector-value" )
Variables ¶
This section is empty.
Functions ¶
func FakeAPBinding ¶
func FakeAPBinding() *apbindingpb.APBinding
func FakeAttestationPolicy ¶
func FakeAttestationPolicy() *attestationpolicypb.AttestationPolicy
func FakeBundle ¶
func FakeCluster ¶
func FakeFederatedService ¶
func FakeFederatedService() *federatedservicepb.FederatedService
func FakeIdentity ¶ added in v0.24.2
func FakeIdentity() *identitypb.Identity
func FakeK8sPodWorkload ¶ added in v0.24.2
func FakeK8sPodWorkload() *workloadpb.Workload
func FakeOrganization ¶ added in v0.30.0
func FakeOrganization() *organizationpb.Organization
func FakeTrustZone ¶
func FakeTrustZone() *trustzonepb.TrustZone
func RequireUnimplemented ¶
RequireUnimplemented requires that an error is a gRPC Status with the Unimplemented code.
Types ¶
type TestServer ¶
type TestServer struct {
Listener *bufconn.Listener
Server *grpc.Server
// contains filtered or unexported fields
}
TestServer provides a gRPC server for testing with an in-memory bufconn transport.
func NewTestServer ¶
func NewTestServer(t *testing.T) *TestServer
func (*TestServer) CreateClientConn ¶
func (ts *TestServer) CreateClientConn() *grpc.ClientConn
BuildTestConn creates a gRPC client connection for the provided TestServer.
func (*TestServer) Serve ¶
func (ts *TestServer) Serve()
Click to show internal directories.
Click to hide internal directories.