test

package
v0.2.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertNoRatelimitAnnotations

func AssertNoRatelimitAnnotations(
	t *testing.T,
	actualAnnotations annotations.Annotations,
)

AssertNoRatelimitAnnotations - the annotations that ResourceSyncers return can contain "informational" ratelimit annotations that let the caller know how much quota they have left and that their request was _not_ rejected. This helper just asserts that there are no "your request was ratelimited" annotations.

func AssertWasRatelimited

func AssertWasRatelimited(
	t *testing.T,
	actualAnnotations annotations.Annotations,
)

func ExhaustEntitlementPagination

func ExhaustEntitlementPagination(
	ctx context.Context,
	c connectorbuilder.ResourceSyncer,
	resource *v2.Resource,
) (
	[]*v2.Entitlement,
	annotations.Annotations,
	error,
)

func ExhaustGrantPagination

func ExhaustGrantPagination(
	ctx context.Context,
	c connectorbuilder.ResourceSyncer,
	resource *v2.Resource,
) (
	[]*v2.Grant,
	annotations.Annotations,
	error,
)

func GrantsIntegrationTest

func GrantsIntegrationTest(
	ctx context.Context,
	t *testing.T,
	c builder,
	principal *v2.Resource,
	entitlement *v2.Entitlement,
)

GrantsIntegrationTest - create a grant and then revoke it. Any connector that implements provisioning should be able to successfully run this test.

func IsRatelimited

func IsRatelimited(actualAnnotations annotations.Annotations) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL