integration

package
v0.0.0-...-0490640 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAuthPoliciesDiagnostic

func CreateAuthPoliciesDiagnostic() diagnostics.Diagnostic

CreateAuthPoliciesDiagnostic create the diagnostic struct for auth tokens and v1 policies.

func CreateAuthTeamsDiagnostic

func CreateAuthTeamsDiagnostic() diagnostics.Diagnostic

CreateAuthTeamsDiagnostic creates a diagnostic for auth teams

func CreateAuthUsersDiagnostic

func CreateAuthUsersDiagnostic() diagnostics.Diagnostic

CreateAuthUsersDiagnostic create the diagnostic struct for auth users

func CreateCLIUpdaterDiagnostic

func CreateCLIUpdaterDiagnostic() diagnostics.Diagnostic

func CreateCfgmgmtActionsDiagnostic

func CreateCfgmgmtActionsDiagnostic() diagnostics.Diagnostic

CreateCfgmgmtActionsDiagnostic create the diagnostic struct for notification rules

func CreateCfgmgmtCCRDiagnostic

func CreateCfgmgmtCCRDiagnostic() diagnostics.Diagnostic

CreateCfgmgmtCCRDiagnostic create the diagnostic struct for ingesting and verifying CCRs

func CreateCfgmgmtJobsConfigDiagnostic

func CreateCfgmgmtJobsConfigDiagnostic() diagnostics.Diagnostic

CreateCfgmgmtJobsConfigDiagnostic creates a diagnostic the checks to make sure the ingest service job config is correctly set after calling stop It assumes people haven't stopped it already

func CreateCfgmgmtLivenessDiagnostic

func CreateCfgmgmtLivenessDiagnostic() diagnostics.Diagnostic

CreateCfgmgmtLivenessDiagnostic creates a diagnostic that sends a liveness ping and verifies they show up in node inventory

func CreateComplianceNodeDiagnostic

func CreateComplianceNodeDiagnostic() diagnostics.Diagnostic

CreateComplianceNodeDiagnostic create the diagnostic struct for compliance node

func CreateComplianceProfileDiagnostic

func CreateComplianceProfileDiagnostic() diagnostics.Diagnostic

CreateComplianceProfileDiagnostic create the diagnostic struct for compliance profile

func CreateComplianceReportDiagnostic

func CreateComplianceReportDiagnostic() diagnostics.Diagnostic

CreateComplianceReportDiagnostic create the diagnostic struct for ingesting and verifying compliance reports

func CreateComplianceReportScanNodesDiagnostic

func CreateComplianceReportScanNodesDiagnostic() diagnostics.Diagnostic

CreateComplianceReportScanNodesDiagnostic create the diagnostic struct for compliance scan job

func CreateComplianceScanJobDiagnostic

func CreateComplianceScanJobDiagnostic() diagnostics.Diagnostic

CreateComplianceScanJobDiagnostic create the diagnostic struct for compliance scan job

func CreateComplianceSecretDiagnostic

func CreateComplianceSecretDiagnostic() diagnostics.Diagnostic

CreateComplianceSecretDiagnostic create the diagnostic struct for compliance secrets

func CreateDeploymentDiagnostic

func CreateDeploymentDiagnostic() diagnostics.Diagnostic

func CreateIAMV2Diagnostic

func CreateIAMV2Diagnostic() diagnostics.Diagnostic

CreateIAMV2Diagnostic create the diagnostic struct for IAM v2 data.

func CreateLicenseDiagnostic

func CreateLicenseDiagnostic() diagnostics.Diagnostic

CreateLicenseDiagnostic create the diagnostic struct for the license service It will disabled telemetry. It verifies that telemetry is disabled, along with a license is present

func CreateNotificationRulesDiagnostic

func CreateNotificationRulesDiagnostic() diagnostics.Diagnostic

CreateNotificationRulesDiagnostic create the diagnostic struct for notification rules

func DeletePolicy

func DeletePolicy(tstCtx diagnostics.TestContext, id string) error

DeletePolicy deletes a policy with the given id

func DeleteTeam

func DeleteTeam(tstCtx diagnostics.TestContext, id string) error

DeleteTeam deletes the team with the given id

func DeleteToken

func DeleteToken(tstCtx diagnostics.TestContext, id string) error

DeleteToken deletes the token with the given id

func DeleteUser

func DeleteUser(tstCtx diagnostics.TestContext, username string) error

DeleteUser user deletes the given user

func MustJSONDecodeSuccess

func MustJSONDecodeSuccess(resp *http.Response, err error) *mustJSONDecodeSuccess

MustJSONDecodeSuccess wraps an http request response and error that must not error and must 200. You can also decode the json value with it, and it must succeed

func Password

func Password() string

Password returns a random password

func Retry

func Retry(times int, backoff time.Duration, f func() error) error

Retry calls f. If f returns an error, it will be retried again after the backoff and at most times times.

func TimestampName

func TimestampName() string

TimestampName returns a name with a timestamp

Types

type PolicyInfo

type PolicyInfo struct {
	ID string `json:"id"`
}

PolicyInfo contains info about a created policy

func CreatePolicyOnToken

func CreatePolicyOnToken(tstCtx diagnostics.TestContext, tokenID string, action string, resource string) (*PolicyInfo, error)

CreatePolicyOnToken creates a policy on a given tokenID

type TeamInfo

type TeamInfo struct {
	Team struct {
		ID          string `json:"id"`
		Name        string `json:"name"`
		Description string `json:"description"`
	} `json:"team"`
}

TeamInfo contains information about a team. This is returned when creating a team and getting a team

func CreateRandomTeam

func CreateRandomTeam(tstCtx diagnostics.TestContext) (*TeamInfo, error)

CreateRandomTeam creates a team with a random name

func GetTeam

func GetTeam(tstCtx diagnostics.TestContext, id string) (*TeamInfo, error)

GetTeam gets the team with the given id

type TokenInfo

type TokenInfo struct {
	ID          string `json:"id"`
	Description string `json:"description"`
	Active      bool   `json:"active"`
	Token       string `json:"value"`
}

TokenInfo holds information about a created token

func CreateRandomToken

func CreateRandomToken(tstCtx diagnostics.TestContext) (*TokenInfo, error)

CreateRandomToken creates a token

type UserInfo

type UserInfo struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	Username string `json:"username"`
	Password string
}

UserInfo represents the user parameters. Password will not be provided when fetching, only when creating.

func CreateRandomUser

func CreateRandomUser(tstCtx diagnostics.TestContext) (*UserInfo, error)

CreateRandomUser creates a random user

func GetUser

func GetUser(tstCtx diagnostics.TestContext, username string) (*UserInfo, error)

GetUser fetches the given user

Jump to

Keyboard shortcuts

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