Documentation
¶
Index ¶
Constants ¶
View Source
const ( HttpEchoName = "http-echo" HttpEchoPort = 3000 )
View Source
const ( TcpEchoName = "tcp-echo" TcpEchoPort = 1025 )
View Source
const ( GATEWAY = "gateway" INGRESS = "ingress" KNATIVE = "knative" )
View Source
const ( TestrunnerName = "testrunner" TestRunnerPort = 1234 // This response is given by the testrunner when the SimpleServer is started SimpleHttpResponse = `` /* 375-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
func NewEchoHttp ¶
func NewEchoTcp ¶ added in v0.9.2
func NewTestRunner ¶
Types ¶
type SoloTestHelper ¶
type SoloTestHelper struct {
*TestConfig
TestRunner
}
This helper is meant to provide a standard way of deploying Gloo/GlooE to a k8s cluster during tests. It assumes that build and test assets are present in the `_output` and `_test` directories (these are configurable). Specifically, it expects the glooctl executable in the BuildAssetDir and a helm chart in TestAssetDir. It also assumes that a kubectl executable is on the PATH.
func NewSoloTestHelper ¶
func NewSoloTestHelper(configFunc TestConfigFunc) (*SoloTestHelper, error)
func (*SoloTestHelper) ChartVersion ¶
func (h *SoloTestHelper) ChartVersion() string
Return the version of the Helm chart
func (*SoloTestHelper) InstallGloo ¶
func (h *SoloTestHelper) InstallGloo(deploymentType string, timeout time.Duration) error
Installs Gloo (and, optionally, the test runner)
func (*SoloTestHelper) UninstallGloo ¶
func (h *SoloTestHelper) UninstallGloo() error
type TestConfig ¶
type TestConfig struct {
// All relative paths will assume this as the base directory. This is usually the project base directory.
RootDir string
// The directory holding the test assets. Must be relative to RootDir.
TestAssetDir string
// The directory holding the build assets. Must be relative to RootDir.
BuildAssetDir string
// Helm chart name
HelmChartName string
// Name of the helm index file name
HelmRepoIndexFileName string
// The namespace gloo (and the test runner) will be installed to. If empty, will use the helm chart version.
InstallNamespace string
// Name of the glooctl executable
GlooctlExecName string
// If provided, the licence key to install the enterprise version of Gloo
LicenseKey string
// Determines whether the test runner pod gets deployed
DeployTestRunner bool
// If true, glooctl will be run with a -v flag
Verbose bool
// contains filtered or unexported fields
}
type TestConfigFunc ¶
type TestConfigFunc func(defaults TestConfig) TestConfig
Function to provide/override test configuration. Default values will be passed in.
type TestRunner ¶
type TestRunner interface {
Deploy(timeout time.Duration) error
Terminate() error
Exec(command ...string) (string, error)
TestRunnerAsync(args ...string) (*bytes.Buffer, chan struct{}, error)
// Checks the response of the request
CurlEventuallyShouldRespond(opts CurlOpts, substr string, ginkgoOffset int, timeout ...time.Duration)
// CHecks all of the output of the curl command
CurlEventuallyShouldOutput(opts CurlOpts, substr string, ginkgoOffset int, timeout ...time.Duration)
Curl(opts CurlOpts) (string, error)
}
Click to show internal directories.
Click to hide internal directories.