coderdenttest

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddLicense

func AddLicense(t *testing.T, client *codersdk.Client, options LicenseOptions) codersdk.License

AddLicense generates a new license with the options provided and inserts it.

func GenerateLicense

func GenerateLicense(t *testing.T, options LicenseOptions) string

GenerateLicense returns a signed JWT using the test key.

func New

func New(t *testing.T, options *Options) *codersdk.Client

New constructs a codersdk client connected to an in-memory Enterprise API instance.

func NewWithAPI

func NewWithAPI(t *testing.T, options *Options) (*codersdk.Client, io.Closer, *coderd.API)

Types

type LicenseOptions

type LicenseOptions struct {
	AccountType string
	AccountID   string
	GraceAt     time.Time
	ExpiresAt   time.Time
	UserLimit   int64
	AuditLog    bool
	BrowserOnly bool
	SCIM        bool
}

type Options

type Options struct {
	*coderdtest.Options
	BrowserOnly                bool
	EntitlementsUpdateInterval time.Duration
	SCIMAPIKey                 []byte
}

Jump to

Keyboard shortcuts

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