Documentation ¶
Overview ¶
Package tests contains REST API tests for following endpoints:
apiPrefix
Package tests contains REST API tests for following endpoints:
apiPrefix
apiPrefix+"organizations"
apiPrefix+"report/{organization}/{cluster}"
apiPrefix+"clusters/{cluster}/rules/{rule_id}/like"
apiPrefix+"clusters/{cluster}/rules/{rule_id}/dislike"
apiPrefix+"clusters/{cluster}/rules/{rule_id}/reset_vote"
apiPrefix+"organizations/{organization}/clusters"
Index ¶
- Constants
- func BasicTests()
- func ClustersDetailTests()
- func ClustersTests()
- func DisableRuleTests()
- func MultipleReportsTests()
- func MultipleReportsTestsUsingPostMethod()
- func OrganizationsTests()
- func ReportsMetadataTests()
- func ReportsTests()
- func ServerTests()
- func VoteTests()
- type ClusterInfo
- type ClusterInfoMeta
- type ClusterInfoResponse
- type ClusterListInRequest
- type ClustersResponse
- type InfoResponse
- type MultipleReportsResponse
- type OrganizationsResponse
- type RuleVoteResponse
- type StatusOnlyResponse
Constants ¶
const ( // ContentTypeJSON represents MIME type for JSON format ContentTypeJSON = "application/json; charset=utf-8" // ContentTypeText represents MIME type for plain text format ContentTypeText = "text/plain; charset=utf-8" )
common constants used by REST API tests
Variables ¶
This section is empty.
Functions ¶
func ClustersDetailTests ¶ added in v1.2.6
func ClustersDetailTests()
ClustersDetailTests implements tests for REST API endpoints apiPrefix+"rules/{rule_selector}/organizations/{org_id}/users/{user_id}/clusters_detail"
func ClustersTests ¶
func ClustersTests()
ClustersTests implements tests for REST API endpoints apiPrefix+"report/{organization}/{cluster}"
func DisableRuleTests ¶ added in v1.1.4
func DisableRuleTests()
DisableRuleTests implements tests for REST API endpoints for disabling etc. rules
func MultipleReportsTests ¶ added in v1.1.2
func MultipleReportsTests()
MultipleReportsTests function implements tests for REST API endpoints apiPrefix+"organizations/{organization}/clusters/{clusterList}/reports"
func MultipleReportsTestsUsingPostMethod ¶ added in v1.1.2
func MultipleReportsTestsUsingPostMethod()
MultipleReportsTestsUsingPostMethod function implements tests for REST API endpoints apiPrefix+"organizations/{organization}/clusters/reports" in a variant that accepts cluster list in request payload
func OrganizationsTests ¶
func OrganizationsTests()
OrganizationsTests implements tests for REST API endpoints apiPrefix+"organizations"
func ReportsMetadataTests ¶ added in v1.2.2
func ReportsMetadataTests()
ReportsMetadataTests implements tests for REST API endpoints apiPrefix+"report/{organization}/{cluster}/info"
func ReportsTests ¶
func ReportsTests()
ReportsTests implements tests for REST API endpoints apiPrefix+"report/{organization}/{cluster}"
Types ¶
type ClusterInfo ¶ added in v1.2.6
type ClusterInfo struct { Cluster string `json:"cluster"` // Name string `json:"cluster_name"` // LastSeen string `json:"last_checked_at"` Meta ClusterInfoMeta `json:"meta"` }
ClusterInfo represents the cluster information
type ClusterInfoMeta ¶ added in v1.2.6
type ClusterInfoMeta struct {
Version string `json:"cluster_version"`
}
ClusterInfoMeta represents the cluster metadata information
type ClusterInfoResponse ¶ added in v1.2.6
type ClusterInfoResponse struct { Clusters []ClusterInfo `json:"clusters"` Status string `json:"status"` }
ClusterInfoResponse represents the response containing the cluster information and status
type ClusterListInRequest ¶ added in v1.1.2
type ClusterListInRequest struct {
Clusters []string `json:"clusters"`
}
ClusterListInRequest represents request body containing list of clusters
type ClustersResponse ¶
ClustersResponse represents response containing list of clusters for given organization
type InfoResponse ¶ added in v1.1.11
InfoResponse represents response from /info endpoint
type MultipleReportsResponse ¶ added in v1.1.2
type MultipleReportsResponse struct { Clusters []string `json:"clusters"` Errors []string `json:"errors"` Reports map[string]interface{} `json:"reports"` GeneratedAt string `json:"generated_at"` Status string `json:"status"` }
MultipleReportsResponse represents response from the server that contains results for multiple clusters together with overall status
type OrganizationsResponse ¶
type OrganizationsResponse struct { Organizations []int `json:"organizations"` Status string `json:"status"` }
OrganizationsResponse represents response containing list of organizations
type RuleVoteResponse ¶
RuleVoteResponse represents response containing rule votes
type StatusOnlyResponse ¶
type StatusOnlyResponse struct {
Status string `json:"status"`
}
StatusOnlyResponse represents response containing just a status