Documentation ¶
Index ¶
- type ClusterAssertion
- type Provider
- func (p *Provider) CheckResources() ClusterAssertion
- func (p *Provider) CurlFnEventuallyResponds(curlFn func() string, expectedResponse *matchers.HttpResponse, ...) ClusterAssertion
- func (p *Provider) EnvoyAdminApiAssertion(envoyDeployment metav1.ObjectMeta, ...) ClusterAssertion
- func (p *Provider) EphemeralCurlEventuallyResponds(curlPod client.Object, curlOptions []curl.Option, ...) ClusterAssertion
- func (p *Provider) InstallationWasSuccessful() ClusterAssertion
- func (p *Provider) NamespaceNotExist(ns string) ClusterAssertion
- func (p *Provider) ObjectsExist(objects ...client.Object) ClusterAssertion
- func (p *Provider) ObjectsNotExist(objects ...client.Object) ClusterAssertion
- func (p *Provider) RunningReplicas(deploymentMeta metav1.ObjectMeta, replicaMatcher types.GomegaMatcher) ClusterAssertion
- func (p *Provider) UninstallationWasSuccessful() ClusterAssertion
- func (p *Provider) WithClusterContext(clusterContext *cluster.Context) *Provider
- func (p *Provider) WithGlooGatewayContext(ggCtx *gloogateway.Context) *Provider
- func (p *Provider) WithProgressWriter(progressWriter io.Writer) *Provider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterAssertion ¶
ClusterAssertion is a function which asserts a given behavior at a point in time If it succeeds, it will not return anything If it fails, it must panic We typically rely on the onsi.Gomega library to implement these assertions
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider is the entity that creates a ClusterAssertion These assertions occur against a running instance of Gloo Gateway, within a Kubernetes Cluster. So this provider maintains state about the install/cluster it is using, and then provides operations.ClusterAssertion to match
func NewProvider ¶
func NewProvider() *Provider
NewProvider returns a Provider that will provide Assertions that can be executed against an installation of Gloo Gateway
func (*Provider) CheckResources ¶
func (p *Provider) CheckResources() ClusterAssertion
CheckResources returns the ClusterAssertion that performs a `glooctl check`
func (*Provider) CurlFnEventuallyResponds ¶
func (p *Provider) CurlFnEventuallyResponds(curlFn func() string, expectedResponse *matchers.HttpResponse, timeout ...time.Duration) ClusterAssertion
CurlFnEventuallyResponds returns a ClusterAssertion that behaves similarly to EphemeralCurlEventuallyResponds The difference is that it accepts a generic function to execute the curl, instead of requiring the caller to pass explicit curl.Option Not all curl requests should be done from an ephemeral container, and this function allows for that to occur
func (*Provider) EnvoyAdminApiAssertion ¶
func (p *Provider) EnvoyAdminApiAssertion( envoyDeployment metav1.ObjectMeta, adminAssertion func(ctx context.Context, adminClient *admincli.Client), ) ClusterAssertion
func (*Provider) EphemeralCurlEventuallyResponds ¶
func (p *Provider) EphemeralCurlEventuallyResponds(curlPod client.Object, curlOptions []curl.Option, expectedResponse *matchers.HttpResponse, timeout ...time.Duration) ClusterAssertion
EphemeralCurlEventuallyResponds returns a ClusterAssertion to assert that a set of curl.Option will return the expected matchers.HttpResponse This implementation relies on executing from an ephemeral container. It is the caller's responsibility to ensure the curlPodMeta points to a pod that is alive and ready to accept traffic
func (*Provider) InstallationWasSuccessful ¶
func (p *Provider) InstallationWasSuccessful() ClusterAssertion
func (*Provider) NamespaceNotExist ¶
func (p *Provider) NamespaceNotExist(ns string) ClusterAssertion
func (*Provider) ObjectsExist ¶
func (p *Provider) ObjectsExist(objects ...client.Object) ClusterAssertion
func (*Provider) ObjectsNotExist ¶
func (p *Provider) ObjectsNotExist(objects ...client.Object) ClusterAssertion
func (*Provider) RunningReplicas ¶
func (p *Provider) RunningReplicas(deploymentMeta metav1.ObjectMeta, replicaMatcher types.GomegaMatcher) ClusterAssertion
func (*Provider) UninstallationWasSuccessful ¶
func (p *Provider) UninstallationWasSuccessful() ClusterAssertion
func (*Provider) WithClusterContext ¶
WithClusterContext sets the provider to point to the provided cluster
func (*Provider) WithGlooGatewayContext ¶
func (p *Provider) WithGlooGatewayContext(ggCtx *gloogateway.Context) *Provider
WithGlooGatewayContext sets the providers to point to a particular installation of Gloo Gateway