Documentation ¶
Index ¶
- func MustTestHelper(ctx context.Context, installation *TestInstallation) *helper.SoloTestHelper
- type GeneratedFiles
- type TestCluster
- type TestInstallation
- func (i *TestInstallation) AddIstioctl(ctx context.Context) error
- func (i *TestInstallation) CreateIstioBugReport(ctx context.Context)
- func (i *TestInstallation) InstallGlooGateway(ctx context.Context, installFn func(ctx context.Context) error)
- func (i *TestInstallation) InstallMinimalIstio(ctx context.Context) error
- func (i *TestInstallation) PreFailHandler(ctx context.Context)
- func (i *TestInstallation) String() string
- func (i *TestInstallation) UninstallGlooGateway(ctx context.Context, uninstallFn func(ctx context.Context) error)
- func (i *TestInstallation) UninstallIstio() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustTestHelper ¶
func MustTestHelper(ctx context.Context, installation *TestInstallation) *helper.SoloTestHelper
MustTestHelper returns the SoloTestHelper used for e2e tests The SoloTestHelper is a wrapper around `glooctl` and we should eventually phase it out in favor of using the exact tool that users rely on
Types ¶
type GeneratedFiles ¶
type GeneratedFiles struct { // TempDir is the directory where any temporary files should be created // Tests may create files for any number of reasons: // - A: When a test renders objects in a file, and then uses this file to create and delete values // - B: When a test invokes a command that produces a file as a side effect (glooctl, for example) // Files in this directory are an implementation detail of the test itself. // As a result, it is the callers responsibility to clean up the TempDir when the tests complete TempDir string // FailureDir is the directory where any assets that are produced on failure will be created FailureDir string }
GeneratedFiles is a collection of files that are generated during the execution of a set of tests
func MustGeneratedFiles ¶
func MustGeneratedFiles(tmpDirId string) GeneratedFiles
MustGeneratedFiles returns GeneratedFiles, or panics if there was an error generating the directories
type TestCluster ¶
type TestCluster struct { // RuntimeContext contains the set of properties that are defined at runtime by whoever is invoking tests RuntimeContext testruntime.Context // ClusterContext contains the metadata about the Kubernetes Cluster that is used for this TestCluster ClusterContext *cluster.Context // contains filtered or unexported fields }
TestCluster is the structure around a set of tests that run against a Kubernetes Cluster Within a TestCluster, we spin off multiple TestInstallation to test the behavior of a particular installation
func MustTestCluster ¶
func MustTestCluster() *TestCluster
func (*TestCluster) RegisterTestInstallation ¶
func (c *TestCluster) RegisterTestInstallation(t *testing.T, glooGatewayContext *gloogateway.Context) *TestInstallation
func (*TestCluster) UnregisterTestInstallation ¶
func (c *TestCluster) UnregisterTestInstallation(installation *TestInstallation)
type TestInstallation ¶
type TestInstallation struct { fmt.Stringer // TestCluster contains the properties of the TestCluster this TestInstallation is a part of TestCluster *TestCluster // Metadata contains the properties used to install Gloo Gateway Metadata *gloogateway.Context // ResourceClients is a set of clients that can manipulate resources owned by Gloo Gateway ResourceClients gloogateway.ResourceClients // Actions is the entity that creates actions that can be executed by the Operator Actions *actions.Provider // Assertions is the entity that creates assertions that can be executed by the Operator Assertions *assertions.Provider // GeneratedFiles is the collection of directories and files that this test installation _may_ create GeneratedFiles GeneratedFiles // IstioctlBinary is the path to the istioctl binary that can be used to interact with Istio IstioctlBinary string }
TestInstallation is the structure around a set of tests that validate behavior for an installation of Gloo Gateway.
func (*TestInstallation) AddIstioctl ¶
func (i *TestInstallation) AddIstioctl(ctx context.Context) error
func (*TestInstallation) CreateIstioBugReport ¶
func (i *TestInstallation) CreateIstioBugReport(ctx context.Context)
func (*TestInstallation) InstallGlooGateway ¶
func (*TestInstallation) InstallMinimalIstio ¶
func (i *TestInstallation) InstallMinimalIstio(ctx context.Context) error
func (*TestInstallation) PreFailHandler ¶
func (i *TestInstallation) PreFailHandler(ctx context.Context)
PreFailHandler is the function that is invoked if a test in the given TestInstallation fails
func (*TestInstallation) String ¶
func (i *TestInstallation) String() string
func (*TestInstallation) UninstallGlooGateway ¶
func (*TestInstallation) UninstallIstio ¶
func (i *TestInstallation) UninstallIstio() error