Documentation ¶
Index ¶
- type Test
- type TestCluster
- type TestExecutor
- type TestInstallation
- func (i *TestInstallation) InstallGlooGateway(ctx context.Context, installAction actions.ClusterAction) error
- func (i *TestInstallation) RunTest(ctx context.Context, test Test)
- func (i *TestInstallation) String() string
- func (i *TestInstallation) UninstallGlooGateway(ctx context.Context, uninstallAction actions.ClusterAction) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Test ¶
type Test struct { // Name is a required value that uniquely identifies a test Name string // Description is an optional value that is used to provide context to developers about a test's purpose Description string // Test is the actual function that executes the test Test TestExecutor }
Test represents a single end-to-end behavior that is validated against a running installation of Gloo Gateway. Tests are grouped by the feature they validate, and are defined in the test/kubernetes/e2e/features directory
type TestCluster ¶
type TestCluster struct { // RuntimeContext contains the set of properties that are defined at runtime by whoever is invoking tests RuntimeContext runtime.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 (*TestCluster) PreFailHandler ¶
func (c *TestCluster) PreFailHandler()
PreFailHandler will execute the PreFailHandler for any of the TestInstallation that are registered with the given TestCluster. The function will be executed when a test in the TestCluster fails, but before any of the cleanup functions (AfterEach, AfterAll) are invoked. This allows us to capture relevant details about the running installation of Gloo Gateway and the Kubernetes Cluster
func (*TestCluster) RegisterTestInstallation ¶
func (c *TestCluster) RegisterTestInstallation(glooGatewayContext *gloogateway.Context) *TestInstallation
func (*TestCluster) UnregisterTestInstallation ¶
func (c *TestCluster) UnregisterTestInstallation(installation *TestInstallation)
type TestExecutor ¶
type TestExecutor func(ctx context.Context, suite *TestInstallation)
TestExecutor is a function that executes a test, for a given 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 // Operator is responsible for executing operations against an installation of Gloo Gateway // This is meant to simulate the behaviors that a person could execute Operator *operations.Operator // Actions is the entity that creates actions that can be executed by the Operator Actions *provider.ActionsProvider // Assertions is the entity that creates assertions that can be executed by the Operator Assertions *assertions.Provider }
TestInstallation is the structure around a set of tests that validate behavior for an installation of Gloo Gateway.
func (*TestInstallation) InstallGlooGateway ¶
func (i *TestInstallation) InstallGlooGateway(ctx context.Context, installAction actions.ClusterAction) error
func (*TestInstallation) RunTest ¶
func (i *TestInstallation) RunTest(ctx context.Context, test Test)
RunTest will execute a single Test against the installation We intentionally do not expose a RunTests method, because then we would lose the ability to randomize tests through the testing framework
func (*TestInstallation) String ¶
func (i *TestInstallation) String() string
func (*TestInstallation) UninstallGlooGateway ¶
func (i *TestInstallation) UninstallGlooGateway(ctx context.Context, uninstallAction actions.ClusterAction) error