coderdenttest

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Keys = map[string]ed25519.PublicKey{}
)

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
	Trial       bool
	AllFeatures bool
	GraceAt     time.Time
	ExpiresAt   time.Time
	Features    license.Features
}

type Options

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

Jump to

Keyboard shortcuts

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