Documentation ¶
Index ¶
- func AgentRestart(client *api.Client, nodeID string) (string, error)
- func AllocIDsFromAllocationListStubs(allocs []*api.AllocationListStub) []string
- func DeploymentsForJob(t *testing.T, nomadClient *api.Client, jobID string) []*api.Deployment
- func ListLinuxClientNodes(client *api.Client) ([]string, error)
- func ListWindowsClientNodes(client *api.Client) ([]string, error)
- func RegisterAllocs(t *testing.T, nomadClient *api.Client, jobFile, jobID, cToken string) []*api.AllocationListStub
- func RegisterAndWaitForAllocs(t *testing.T, nomadClient *api.Client, jobFile, jobID, cToken string) []*api.AllocationListStub
- func RequireConsulDeregistered(require *require.Assertions, client *capi.Client, serviceName string)
- func RequireConsulStatus(require *require.Assertions, client *capi.Client, ...)
- func WaitForAllocNotPending(t *testing.T, nomadClient *api.Client, allocID string)
- func WaitForAllocRunning(t *testing.T, nomadClient *api.Client, allocID string)
- func WaitForAllocsNotPending(t *testing.T, nomadClient *api.Client, allocIDs []string)
- func WaitForAllocsRunning(t *testing.T, nomadClient *api.Client, allocIDs []string)
- func WaitForDeployment(t *testing.T, nomadClient *api.Client, deployID string, status string, ...)
- func WaitForLeader(t *testing.T, nomadClient *api.Client)
- func WaitForNodesReady(t *testing.T, nomadClient *api.Client, nodes int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AgentRestart ¶
AgentRestart is a test helper function that restarts a client node running under systemd using a raw_exec job. Returns the job ID of the restart job so that callers can clean it up.
func AllocIDsFromAllocationListStubs ¶
func AllocIDsFromAllocationListStubs(allocs []*api.AllocationListStub) []string
func DeploymentsForJob ¶
func ListLinuxClientNodes ¶
ListLinuxClientNodes returns a list of Linux client IDs, so that tests can skip operating-specific tests if there are no Linux clients available Returns an error only on client errors.
func ListWindowsClientNodes ¶
ListWindowsClientNodes returns a list of Windows client IDs, so that tests can skip operating-specific tests if there are no Windows clients available. Returns an error only on client errors.
func RegisterAllocs ¶
func RequireConsulDeregistered ¶
func RequireConsulDeregistered(require *require.Assertions, client *capi.Client, serviceName string)
RequireConsulDeregistered asserts that the service eventually is deregistered from Consul
func RequireConsulStatus ¶
func RequireConsulStatus(require *require.Assertions, client *capi.Client, serviceName, expectedStatus string)
RequireConsulStatus asserts the aggregate health of the service converges to the expected status
func WaitForAllocNotPending ¶
func WaitForAllocRunning ¶
func WaitForAllocsNotPending ¶
func WaitForAllocsRunning ¶
func WaitForDeployment ¶
Types ¶
This section is empty.