coderdenttest

package
v0.9.9 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: AGPL-3.0 Imports: 13 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
	UserLimit           int64
	AuditLog            bool
	BrowserOnly         bool
	SCIM                bool
	WorkspaceQuota      bool
	TemplateRBACEnabled bool
}

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