Documentation
¶
Index ¶
- func AwaitProjectVersionJob(t *testing.T, client *codersdk.Client, version uuid.UUID) codersdk.ProjectVersion
- func AwaitWorkspaceAgents(t *testing.T, client *codersdk.Client, build uuid.UUID) []codersdk.WorkspaceResource
- func AwaitWorkspaceBuildJob(t *testing.T, client *codersdk.Client, build uuid.UUID) codersdk.WorkspaceBuild
- func CreateAnotherUser(t *testing.T, client *codersdk.Client, organizationID uuid.UUID) *codersdk.Client
- func CreateFirstUser(t *testing.T, client *codersdk.Client) codersdk.CreateFirstUserResponse
- func CreateProject(t *testing.T, client *codersdk.Client, organization uuid.UUID, ...) codersdk.Project
- func CreateProjectVersion(t *testing.T, client *codersdk.Client, organizationID uuid.UUID, ...) codersdk.ProjectVersion
- func CreateWorkspace(t *testing.T, client *codersdk.Client, user uuid.UUID, projectID uuid.UUID) codersdk.Workspace
- func New(t *testing.T, options *Options) *codersdk.Client
- func NewAWSInstanceIdentity(t *testing.T, instanceID string) (awsidentity.Certificates, *http.Client)
- func NewGoogleInstanceIdentity(t *testing.T, instanceID string, expired bool) (*idtoken.Validator, *metadata.Client)
- func NewProvisionerDaemon(t *testing.T, client *codersdk.Client) io.Closer
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AwaitProjectVersionJob ¶
func AwaitProjectVersionJob(t *testing.T, client *codersdk.Client, version uuid.UUID) codersdk.ProjectVersion
AwaitProjectImportJob awaits for an import job to reach completed status.
func AwaitWorkspaceAgents ¶
func AwaitWorkspaceAgents(t *testing.T, client *codersdk.Client, build uuid.UUID) []codersdk.WorkspaceResource
AwaitWorkspaceAgents waits for all resources with agents to be connected.
func AwaitWorkspaceBuildJob ¶
func AwaitWorkspaceBuildJob(t *testing.T, client *codersdk.Client, build uuid.UUID) codersdk.WorkspaceBuild
AwaitWorkspaceBuildJob waits for a workspace provision job to reach completed status.
func CreateAnotherUser ¶
func CreateAnotherUser(t *testing.T, client *codersdk.Client, organizationID uuid.UUID) *codersdk.Client
CreateAnotherUser creates and authenticates a new user.
func CreateFirstUser ¶
CreateFirstUser creates a user with preset credentials and authenticates with the passed in codersdk client.
func CreateProject ¶
func CreateProject(t *testing.T, client *codersdk.Client, organization uuid.UUID, version uuid.UUID) codersdk.Project
CreateProject creates a project with the "echo" provisioner for compatibility with testing. The name assigned is randomly generated.
func CreateProjectVersion ¶
func CreateProjectVersion(t *testing.T, client *codersdk.Client, organizationID uuid.UUID, res *echo.Responses) codersdk.ProjectVersion
CreateProjectVersion creates a project import provisioner job with the responses provided. It uses the "echo" provisioner for compatibility with testing.
func CreateWorkspace ¶
func CreateWorkspace(t *testing.T, client *codersdk.Client, user uuid.UUID, projectID uuid.UUID) codersdk.Workspace
CreateWorkspace creates a workspace for the user and project provided. A random name is generated for it.
func NewAWSInstanceIdentity ¶
func NewAWSInstanceIdentity(t *testing.T, instanceID string) (awsidentity.Certificates, *http.Client)
NewAWSInstanceIdentity returns a metadata client and ID token validator for faking instance authentication for AWS.
Types ¶
type Options ¶
type Options struct { AWSInstanceIdentity awsidentity.Certificates GoogleInstanceIdentity *idtoken.Validator }