tests

package
v0.0.0-...-936a01b Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const API_URL = "http://localhost:8080/api/v1/"

API_URL represents the entry point to REST API of the controller service

Variables

This section is empty.

Functions

func AuthTests

func AuthTests()

AuthTests - authorization related tests

func ClusterTests

func ClusterTests()

ClusterTests run all cluster-related REST API tests.

func ConfigurationTests

func ConfigurationTests()

ConfigurationTests run all configuration-related REST API tests.

func OperatorTests

func OperatorTests()

OperatorTests run all operator-related REST API tests.

func ProfileTests

func ProfileTests()

ProfileTests run all configuration profile-related REST API tests.

func ServerTests

func ServerTests()

ServerTests run all tests for basic REST API endpoints

func TriggerTests

func TriggerTests()

TriggerTests run all trigger-related REST API tests.

Types

type Cluster

type Cluster struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

Cluster represents cluster record in the controller service.

ID: unique key
Name: cluster GUID in the following format:
    c8590f31-e97e-4b85-b506-c45ce1911a12

type ClusterConfiguration

type ClusterConfiguration struct {
	ID            int    `json:"id"`
	Cluster       string `json:"cluster"`
	Configuration string `json:"configuration"`
	ChangedAt     string `json:"changed_at"`
	ChangedBy     string `json:"changed_by"`
	Active        string `json:"active"`
	Reason        string `json:"reason"`
}

ClusterConfiguration represents cluster configuration record in the controller service.

ID: unique key
Cluster: cluster ID (not name)
Configuration: a JSON structure stored in a string
ChangeAt: timestamp of the last configuration change
ChangeBy: username of admin that created or updated the configuration
Active: flag indicating whether the configuration is active or not
Reason: a string with any comment(s) about the cluster configuration

type ClusterConfigurationsResponse

type ClusterConfigurationsResponse struct {
	Status        string                 `json:"status"`
	Configuration []ClusterConfiguration `json:"configuration"`
}

ClusterConfigurationsResponse represents default response for cluster configuration request

type ClusterResponse

type ClusterResponse struct {
	Status   string    `json:"status"`
	Clusters []Cluster `json:"clusters"`
}

ClusterResponse represents default response for cluster request

type ConfigurationProfile

type ConfigurationProfile struct {
	ID            int    `json:"id"`
	Configuration string `json:"configuration"`
	ChangedAt     string `json:"changed_at"`
	ChangedBy     string `json:"changed_by"`
	Description   string `json:"description"`
}

ConfigurationProfile represents configuration profile record in the controller service.

ID: unique key
Configuration: a JSON structure stored in a string
ChangeAt: username of admin that created or updated the configuration
ChangeBy: timestamp of the last configuration change
Description: a string with any comment(s) about the configuration

type ConfigurationProfileResponse

type ConfigurationProfileResponse struct {
	Status  string               `json:"status"`
	Profile ConfigurationProfile `json:"profile"`
}

ConfigurationProfileResponse represents default response for single configuration profile request

type ConfigurationProfilesResponse

type ConfigurationProfilesResponse struct {
	Status   string                 `json:"status"`
	Profiles []ConfigurationProfile `json:"profiles"`
}

ConfigurationProfilesResponse represents default response for configuration profile request

type Trigger

type Trigger struct {
	ID          int    `json:"id"`
	Type        string `json:"type"`
	Cluster     string `json:"cluster"`
	Reason      string `json:"reason"`
	Link        string `json:"link"`
	TriggeredAt string `json:"triggered_at"`
	TriggeredBy string `json:"triggered_by"`
	AckedAt     string `json:"acked_at"`
	Parameters  string `json:"parameters"`
	Active      int    `json:"active"`
}

Trigger represents trigger record in the controller service

ID: unique key
Type: ID of trigger type
Cluster: cluster ID (not name)
Reason: a string with any comment(s) about the trigger
Link: link to any document with customer ACK with the trigger
TriggeredAt: timestamp of the last configuration change
TriggeredBy: username of admin that created or updated the trigger
AckedAt: timestamp where the insights operator acked the trigger
Parameters: parameters that needs to be pass to trigger code
Active: flag indicating whether the trigger is still active or not

type TriggerResponse

type TriggerResponse struct {
	Status   string    `json:"status"`
	Triggers []Trigger `json:"triggers"`
}

TriggerResponse represents default response for trigger request

Jump to

Keyboard shortcuts

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