Documentation
¶
Index ¶
- Constants
- func CheckProxyContainer(deployName, namespace string) error
- func Err(err error) string
- func InstallLinkerdBinary(linkerd, version string, force bool, verbose bool) error
- func InstallLinkerdControlPlane(h *testutil.TestHelper, c *ConformanceTestOptions)
- func RunBeforeAndAfterEachSetup()
- func RunCheck(h *testutil.TestHelper, pre bool)
- func ShouldTestSkip(skip bool, message string) bool
- func TestControlPlanePostInstall(h *testutil.TestHelper)
- func TestEmojivotoApp()
- func TestEmojivotoInject()
- func TestEmojivotoUninstall()
- func UninstallLinkerdControlPlane(h *testutil.TestHelper)
- type CheckOutput
- type ConformanceTestOptions
- func (options *ConformanceTestOptions) CleanEdges() bool
- func (options *ConformanceTestOptions) CleanInject() bool
- func (options *ConformanceTestOptions) CleanRoutes() bool
- func (options *ConformanceTestOptions) CleanStat() bool
- func (options *ConformanceTestOptions) CleanTap() bool
- func (options *ConformanceTestOptions) GetAddOnsYAML() (out []byte, err error)
- func (options *ConformanceTestOptions) GetAddons() map[string]interface{}
- func (options *ConformanceTestOptions) GetIngressControllerConfig() *[]IngressControllerConfig
- func (options *ConformanceTestOptions) GetInstallFlags() []string
- func (options *ConformanceTestOptions) GetLinkerdPath() string
- func (options *ConformanceTestOptions) HA() bool
- func (options *ConformanceTestOptions) ShouldCleanIngressInstallation(t string) bool
- func (options *ConformanceTestOptions) ShouldTestIngressOfType(t string) bool
- func (options *ConformanceTestOptions) SingleControlPlane() bool
- func (options *ConformanceTestOptions) SkipEdges() bool
- func (options *ConformanceTestOptions) SkipIngress() bool
- func (options *ConformanceTestOptions) SkipInject() bool
- func (options *ConformanceTestOptions) SkipLifecycle() bool
- func (options *ConformanceTestOptions) SkipRoutes() bool
- func (options *ConformanceTestOptions) SkipStat() bool
- func (options *ConformanceTestOptions) SkipTap() bool
- type ControlPlane
- type ControlPlaneConfig
- type Edges
- type Ingress
- type IngressConfig
- type IngressControllerConfig
- type Inject
- type Lifecycle
- type Routes
- type Stat
- type Tap
- type TestCase
Constants ¶
const ( // Nginx holds the string literal "nginx" Nginx = "nginx" // NginxNs is the namespace in which the nginx controller is installed NginxNs = "ingress-nginx" // NginxController is the name of the nginx controller NginxController = "ingress-nginx-controller" )
Variables ¶
This section is empty.
Functions ¶
func CheckProxyContainer ¶
CheckProxyContainer gets the pods from a deployment, and checks if the proxy container is present
func Err ¶
Err returns err.Error() string if err is not nil This helper is meant to be used with gomega.Should() to annotate failures without causing runtime errors when returned errors are nil
func InstallLinkerdBinary ¶
InstallLinkerdBinary installs a linkerd2 binary of the given version
func InstallLinkerdControlPlane ¶
func InstallLinkerdControlPlane(h *testutil.TestHelper, c *ConformanceTestOptions)
InstallLinkerdControlPlane runs the control plane install tests
func RunBeforeAndAfterEachSetup ¶
func RunBeforeAndAfterEachSetup()
RunBeforeAndAfterEachSetup runs the control plane installation and uninstallation tests when a new control plane is required by each test
func ShouldTestSkip ¶
ShouldTestSkip is called within a Describe block to determine if a test must be skipped
func TestControlPlanePostInstall ¶
func TestControlPlanePostInstall(h *testutil.TestHelper)
TestControlPlanePostInstall tests the control plane resources post installation
func TestEmojivotoApp ¶
func TestEmojivotoApp()
TestEmojivotoApp installs and checks if emojivoto app is installed called of the function must have `testdata/emojivoto.yml`
func TestEmojivotoInject ¶
func TestEmojivotoInject()
TestEmojivotoInject installs and checks if emojivoto app is installed called of the function must have `testdata/emojivoto.yml`
func TestEmojivotoUninstall ¶
func TestEmojivotoUninstall()
TestEmojivotoUninstall tests if emojivoto can be successfull uninstalled
func UninstallLinkerdControlPlane ¶
func UninstallLinkerdControlPlane(h *testutil.TestHelper)
UninstallLinkerdControlPlane runs the test for control plane uninstall
Types ¶
type CheckOutput ¶
type CheckOutput struct { Success bool `json:"success"` Categories []struct { CategoryName string `json:"categoryName"` Checks []struct { Result string `json:"result"` Error string `json:"error"` } } }
CheckOutput is used for unmarshalling the output from `linkerd check -o json`
type ConformanceTestOptions ¶
type ConformanceTestOptions struct { LinkerdVersion string `yaml:"linkerdVersion,omitempty"` LinkerdBinaryPath string `yaml:"linkerdBinaryPath,omitempty"` ClusterDomain string `yaml:"clusterDomain,omitempty"` K8sContext string `yaml:"k8sContext,omitempty"` ExternalIssuer bool `yaml:"externalIssuer,omitempty"` ControlPlane `yaml:"controlPlane"` TestCase `yaml:"testCase"` }
ConformanceTestOptions holds the values fed from the test config file
func GetHelperAndConfig ¶
func GetHelperAndConfig() (*testutil.TestHelper, *ConformanceTestOptions)
GetHelperAndConfig returns a reference to the initialized `testHelper` and `testConfig`
func (*ConformanceTestOptions) CleanEdges ¶
func (options *ConformanceTestOptions) CleanEdges() bool
CleanEdges returns the value of `options.TestCase.Edges.Clean`
func (*ConformanceTestOptions) CleanInject ¶
func (options *ConformanceTestOptions) CleanInject() bool
CleanInject determines if resources created during inject test must be removed
func (*ConformanceTestOptions) CleanRoutes ¶
func (options *ConformanceTestOptions) CleanRoutes() bool
CleanRoutes checks if tap resources must be deleted
func (*ConformanceTestOptions) CleanStat ¶
func (options *ConformanceTestOptions) CleanStat() bool
CleanStat checks if stat test resources must be deleted
func (*ConformanceTestOptions) CleanTap ¶
func (options *ConformanceTestOptions) CleanTap() bool
CleanTap checks if tap resources must be deleted
func (*ConformanceTestOptions) GetAddOnsYAML ¶
func (options *ConformanceTestOptions) GetAddOnsYAML() (out []byte, err error)
GetAddOnsYAML marshals the add-on config to a YAML and returns the byte slice and error
func (*ConformanceTestOptions) GetAddons ¶
func (options *ConformanceTestOptions) GetAddons() map[string]interface{}
GetAddons returns the add-on config
func (*ConformanceTestOptions) GetIngressControllerConfig ¶
func (options *ConformanceTestOptions) GetIngressControllerConfig() *[]IngressControllerConfig
GetIngressControllerConfig returns a slice of IngressControllerConfig
func (*ConformanceTestOptions) GetInstallFlags ¶
func (options *ConformanceTestOptions) GetInstallFlags() []string
GetInstallFlags returns the flags set by the user for running `linkerd install`
func (*ConformanceTestOptions) GetLinkerdPath ¶
func (options *ConformanceTestOptions) GetLinkerdPath() string
GetLinkerdPath returns the path where Linkerd binary will be installed
func (*ConformanceTestOptions) HA ¶
func (options *ConformanceTestOptions) HA() bool
HA determines if a high-availability control-plane must be used
func (*ConformanceTestOptions) ShouldCleanIngressInstallation ¶
func (options *ConformanceTestOptions) ShouldCleanIngressInstallation(t string) bool
ShouldCleanIngressInstallation checks if a particular ingress installation must be deleted post installation
func (*ConformanceTestOptions) ShouldTestIngressOfType ¶
func (options *ConformanceTestOptions) ShouldTestIngressOfType(t string) bool
ShouldTestIngressOfType checks if a given type of ingress must be tested
func (*ConformanceTestOptions) SingleControlPlane ¶
func (options *ConformanceTestOptions) SingleControlPlane() bool
SingleControlPlane determines if a singl CP must be used throughout
func (*ConformanceTestOptions) SkipEdges ¶
func (options *ConformanceTestOptions) SkipEdges() bool
SkipEdges returns the value of options.TestCase.Edges.Skip
func (*ConformanceTestOptions) SkipIngress ¶
func (options *ConformanceTestOptions) SkipIngress() bool
SkipIngress determines if ingress tests must be skipped
func (*ConformanceTestOptions) SkipInject ¶
func (options *ConformanceTestOptions) SkipInject() bool
SkipInject determines if inject test must be skipped
func (*ConformanceTestOptions) SkipLifecycle ¶
func (options *ConformanceTestOptions) SkipLifecycle() bool
SkipLifecycle determines if install tests must be skipped
func (*ConformanceTestOptions) SkipRoutes ¶
func (options *ConformanceTestOptions) SkipRoutes() bool
SkipRoutes checks if tap tests should be skipped
func (*ConformanceTestOptions) SkipStat ¶
func (options *ConformanceTestOptions) SkipStat() bool
SkipStat checks if `stat` test must be skipped
func (*ConformanceTestOptions) SkipTap ¶
func (options *ConformanceTestOptions) SkipTap() bool
SkipTap checks if tap tests should be skipped
type ControlPlane ¶
type ControlPlane struct { Namespace string `yaml:"namespace,omitempty"` ControlPlaneConfig `yaml:"config,omitempty"` }
ControlPlane wraps Namespace and ControlPlaneConfig
type ControlPlaneConfig ¶
type ControlPlaneConfig struct { HA bool `yaml:"ha,omitempty"` Flags []string `yaml:"flags,omitempty"` AddOns map[string]interface{} `yaml:"addOns,omitempty"` }
ControlPlaneConfig holds the configuration for control plane installation
type Ingress ¶
type Ingress struct { Skip bool `yaml:"skip,omitempty"` IngressConfig `yaml:"config,omitempty"` }
Ingress holds the configuration for ingress test
type IngressConfig ¶
type IngressConfig struct {
Controllers []IngressControllerConfig `yaml:"controllers"`
}
IngressConfig holds the list of ingress controllers
type IngressControllerConfig ¶
IngressControllerConfig holds controller specific configuration
type Inject ¶
type Inject struct { Skip bool `yaml:"skip,omitempty"` Clean bool `yaml:"clean,omitempty"` // deletes all resources created while testing }
Inject holds the inject test configuration
type Lifecycle ¶
type Lifecycle struct { Skip bool `yaml:"skip,omitempty"` UpgradeFromVersion string `yaml:"upgradeFromVersion,omitempty"` Reinstall bool `yaml:"reinstall,omitempty"` Uninstall bool `yaml:"uninstall,omitempty"` }
Lifecycle holds lifecycle test configuration