Documentation
¶
Index ¶
- Constants
- func ExtraArgs(args ...string) func(*InstallOptions)
- func NewEchoHttp(namespace string) (*echoPod, error)
- func NewEchoTcp(namespace string) (*echoPod, error)
- func NewTestRunner(namespace string) (*testRunner, error)
- type CurlOpts
- type InstallOption
- type InstallOptions
- type SoloTestHelper
- type TestConfig
- type TestConfigFunc
- type TestRunner
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 ExtraArgs ¶
func ExtraArgs(args ...string) func(*InstallOptions)
func NewEchoHttp ¶
func NewEchoTcp ¶
func NewTestRunner ¶
Types ¶
type InstallOption ¶
type InstallOption func(*InstallOptions)
type InstallOptions ¶
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, options ...InstallOption) error
Installs Gloo (and, optionally, the test runner)
func (*SoloTestHelper) UninstallGloo ¶
func (h *SoloTestHelper) UninstallGloo() error
does not pass the --all flag to glooctl uninstall
func (*SoloTestHelper) UninstallGlooAll ¶
func (h *SoloTestHelper) UninstallGlooAll() error
passes the --all flag to glooctl uninstall
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) (io.Reader, 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.