helpers

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccountUsername  = "rhn-support-tiwillia"
	DefaultAWSRegion = "us-east-1"

	// Cluster Auhtorization
	M5XLargeResource           = "m5.xlarge"
	AWSComputeNodeResourceType = "compute.node.aws"
	DefaultClusterCount        = 4
	StandardBillingModel       = "standard"
	OsdProductID               = "osd"
	AWSCloudProvider           = "aws"
	ClusterAuthAccountUsername = "rh-perfscale"
	ClusterAuthManaged         = true
	ClusterAuthReserve         = true
	ClusterAuthBYOC            = true
	SingleAvailabilityZone     = "single"
)
View Source
const (
	ClustersEndpoint     = "/api/clusters_mgmt/v1/clusters/"
	SubscriptionEndpoint = "/api/accounts_mgmt/v1/subscriptions/"
)

Variables

This section is empty.

Functions

func BuildConnection

func BuildConnection(ctx context.Context, gateway, clientID, clientSecret, token string, logger logging.Logger) (*sdk.Connection, error)

BuildConnection build the vegeta connection that is going to be used for testing

func Cleanup

func Cleanup(ctx context.Context, connection *sdk.Connection)

func CreateCluster

func CreateCluster(ctx context.Context, body string, gatewayConnection *sdk.Connection) (string, map[string]interface{}, error)

func CreateFile

func CreateFile(name, path string) (*os.File, error)

CreateFile creates the file with the given name

func CreateFolder

func CreateFolder(ctx context.Context, path string, logger logging.Logger) error

CreateFolder creates folder in the system

func DeleteCluster

func DeleteCluster(ctx context.Context, id string, deprovision bool, connection *sdk.Connection)

func DeletedSubscription added in v0.4.0

func DeletedSubscription(ctx context.Context, id string, connection *sdk.Connection)

func GetServerVersion added in v0.4.0

func GetServerVersion(ctx context.Context, connection *sdk.Connection) string

func Parse

func Parse(data []byte) (map[string]interface{}, error)

Parse parses the given JSON data and returns a map of strings containing the result.

func ParseRate

func ParseRate(rate string) (vegeta.Rate, error)

ParseRate addapted `rateFlag` from tsenart/vegeta since the `rateFlag` is not exported it is not possible to reuse the same method, but to match and correctly generate the rate we decided to use the same function. https://github.com/tsenart/vegeta/blob/d73edf2bc2663d83848da2a97a8401a7ed1440bc/flags.go#L68

Types

type CleanTestTransport added in v0.4.0

type CleanTestTransport struct {
	Wrapped http.RoundTripper
	Logger  logging.Logger
}

func (*CleanTestTransport) RoundTrip added in v0.4.0

func (t *CleanTestTransport) RoundTrip(request *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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