e2e

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*graphql.Client
}

Client provides helper functions for queries and mutations that across different test cases. It simplifies setting up a given test prerequisites that are not a part of the test itself.

func NewClientForAPIKey

func NewClientForAPIKey(apiEndpoint, key string) *Client

NewClientForAPIKey returns new GraphQL client with API Key header.

func (*Client) CreateBasicDeploymentWithCloudSlack

func (c *Client) CreateBasicDeploymentWithCloudSlack(t *testing.T, clusterName, slackTeamID, firstChannel, secondChannel, thirdChannel string) (*gqlModel.Deployment, error)

CreateBasicDeploymentWithCloudSlack create deployment with Slack platform and three plugins.

func (*Client) DeleteDeployment

func (c *Client) DeleteDeployment(t *testing.T, id graphql.ID) error

DeleteDeployment deletes a given deployment scoped to a given user.

func (*Client) MustCreateAlias

func (c *Client) MustCreateAlias(t *testing.T, name, displayName, command, deploymentId string) gqlModel.Alias

MustCreateAlias creates alias.

func (*Client) MustCreateBasicDeploymentWithCloudSlack

func (c *Client) MustCreateBasicDeploymentWithCloudSlack(t *testing.T, clusterName, slackTeamID, firstChannel, secondChannel, thirdChannel string) *gqlModel.Deployment

MustCreateBasicDeploymentWithCloudSlack is like CreateBasicDeploymentWithCloudSlack but fails on error.

func (*Client) MustDeleteDeployment

func (c *Client) MustDeleteDeployment(t *testing.T, id graphql.ID)

MustDeleteDeployment is like DeleteDeployment but panics on error.

type Organization

type Organization struct {
	ID                      string                                 `json:"id"`
	DisplayName             string                                 `json:"displayName"`
	Subscription            *gqlModel.OrganizationSubscription     `json:"subscription"`
	ConnectedPlatforms      *OrganizationConnectedPlatforms        `json:"connectedPlatforms"`
	OwnerID                 string                                 `json:"ownerId"`
	Owner                   *gqlModel.User                         `json:"owner"`
	Members                 []*gqlModel.User                       `json:"members"`
	Quota                   *gqlModel.Quota                        `json:"quota"`
	BillingHistoryAvailable bool                                   `json:"billingHistoryAvailable"`
	UpdateOperations        *gqlModel.OrganizationUpdateOperations `json:"updateOperations"`
	Usage                   *gqlModel.Usage                        `json:"usage"`
}

Organization is a custom model that allow us to skip the 'connectedPlatforms.slack' field. Otherwise, we get such error:

Field "slack" argument "id" of type "ID!" is required, but it was not provided.

func (Organization) ToModel

func (o Organization) ToModel() gqlModel.Organization

ToModel returns official gql model.

type OrganizationConnectedPlatforms

type OrganizationConnectedPlatforms struct {
	Slacks []*gqlModel.SlackWorkspace `json:"slacks"`
}

OrganizationConnectedPlatforms skips the 'slack' field.

type Organizations

type Organizations []Organization

Organizations holds organization collection.

func (Organizations) ToModel

func (o Organizations) ToModel() []gqlModel.Organization

ToModel returns official gql model.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳