Documentation ¶
Overview ¶
Package machine provides a number of utility functions encapsulating often-used sequences. I.e. create/delete applications/configurations, bind/unbind configurations, etc. This is done in the hope of enhancing the readability of various before/after blocks.
Index ¶
- type Machine
- func (m *Machine) BindAppConfiguration(appName, configurationName, namespace string)
- func (m *Machine) CleanupApp(appName string)
- func (m *Machine) CleanupConfiguration(configurationName string)
- func (m *Machine) Client() *http.Client
- func (m *Machine) CreateEpinioUser(role string, namespaces []string) (string, string)
- func (m *Machine) Curl(method, uri string, requestBody io.Reader) (*http.Response, error)
- func (m *Machine) DeleteApp(appName string)
- func (m *Machine) DeleteAppchart(tempFile string)
- func (m *Machine) DeleteConfigurations(configurationNames ...string)
- func (m *Machine) DeleteConfigurationsUnbind(configurationNames ...string)
- func (m *Machine) DeleteConfigurationsWithUnbind(configurationNames []string, unbind bool)
- func (m *Machine) DeleteEpinioUser(username string) error
- func (m *Machine) DeleteNamespace(namespace string)
- func (m *Machine) DeleteService(serviceName string)
- func (m *Machine) Epinio(dir, command string, arg ...string) (string, error)
- func (m *Machine) EpinioPush(dir string, name string, arg ...string) (string, error)
- func (m *Machine) GetPodNames(appName, namespaceName string) []string
- func (m *Machine) GetSettings() (*settings.Settings, error)
- func (m *Machine) GetSettingsFrom(location string) (*settings.Settings, error)
- func (m *Machine) HaveConfiguration(configurationName string)
- func (m *Machine) HaveServiceInstance(serviceName string)
- func (m *Machine) MakeApp(appName string, instances int, deployFromCurrentDir bool) string
- func (m *Machine) MakeAppWithDir(appName string, instances int, deployFromCurrentDir bool, appDir string) string
- func (m *Machine) MakeAppWithDirSimple(appName string, deployFromCurrentDir bool, appDir string) string
- func (m *Machine) MakeAppchart(chartName string) string
- func (m *Machine) MakeAppchartStateful(chartName string) string
- func (m *Machine) MakeConfiguration(configurationName string)
- func (m *Machine) MakeContainerImageApp(appName string, instances int, containerImageURL string) string
- func (m *Machine) MakeGolangApp(appName string, instances int, deployFromCurrentDir bool) string
- func (m *Machine) MakeRoutedContainerImageApp(appName string, instances int, containerImageURL, route string, more ...string) string
- func (m *Machine) MakeServiceInstance(serviceName, catalogService string)
- func (m *Machine) MakeWebSocketConnection(authToken string, url string, subprotocols ...string) (*websocket.Conn, error)
- func (m *Machine) SaveApplicationSpec(appName string)
- func (m *Machine) SaveServerLogs(destination string)
- func (m *Machine) SetupAndTargetNamespace(namespace string)
- func (m *Machine) SetupNamespace(namespace string)
- func (m *Machine) ShowStagingLogs(app string)
- func (m *Machine) TargetNamespace(namespace string)
- func (m *Machine) UnbindAppConfiguration(appName, configurationName, namespace string)
- func (m *Machine) VerifyAppConfigurationBound(appName, configurationName, namespace string, offset int)
- func (m *Machine) VerifyAppConfigurationNotbound(appName, configurationName, namespace string, offset int)
- func (m *Machine) VerifyNamespaceNotExist(namespace string)
- func (m *Machine) Versions()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Machine ¶
type Machine struct {
// contains filtered or unexported fields
}
func (*Machine) BindAppConfiguration ¶ added in v0.6.0
func (*Machine) CleanupApp ¶
func (*Machine) CleanupConfiguration ¶ added in v0.6.0
func (*Machine) CreateEpinioUser ¶ added in v0.1.4
CreateEpinioUser creates a new "user" BasicAuth Secret labeled as an Epinio User.
func (*Machine) DeleteAppchart ¶ added in v1.2.0
func (*Machine) DeleteConfigurations ¶ added in v1.3.0
func (*Machine) DeleteConfigurationsUnbind ¶ added in v1.3.0
func (*Machine) DeleteConfigurationsWithUnbind ¶ added in v1.3.0
func (*Machine) DeleteEpinioUser ¶ added in v0.1.4
DeleteEpinioUser deletes the relevant Kubernetes secret if it exists.
func (*Machine) DeleteNamespace ¶ added in v0.1.5
func (*Machine) DeleteService ¶
func (*Machine) Epinio ¶
Epinio invokes the `epinio` binary, running the specified command. It returns the command output and/or error. dir parameter defines the directory from which the command should be run. It defaults to the current dir if left empty.
func (*Machine) EpinioPush ¶ added in v0.4.0
EpinioPush shows the staging log if the error indicates that staging failed
func (*Machine) GetPodNames ¶
func (*Machine) GetSettings ¶ added in v0.6.0
func (*Machine) GetSettingsFrom ¶ added in v0.6.0
func (*Machine) HaveConfiguration ¶ added in v1.4.0
func (*Machine) HaveServiceInstance ¶ added in v1.4.0
func (*Machine) MakeAppWithDir ¶
func (*Machine) MakeAppWithDirSimple ¶ added in v0.1.2
func (*Machine) MakeAppchart ¶ added in v1.2.0
func (*Machine) MakeAppchartStateful ¶ added in v1.2.0
func (*Machine) MakeConfiguration ¶ added in v0.6.0
func (*Machine) MakeContainerImageApp ¶ added in v0.1.2
func (*Machine) MakeGolangApp ¶
func (*Machine) MakeRoutedContainerImageApp ¶ added in v0.6.3
func (*Machine) MakeServiceInstance ¶ added in v0.7.0
func (*Machine) MakeWebSocketConnection ¶
func (*Machine) SaveApplicationSpec ¶ added in v1.1.0
SaveApplicationSpec is a debugging helper function saving the specified application's manifest and helm data (values, chart) into file and directory named after the application.
Note: Intended use is debugging of a test case. Most tests cases will not need this as part of their regular operation.
__Attention__: The created files and directory are __not cleaned up automatically__
func (*Machine) SaveServerLogs ¶ added in v1.1.0
SaveServerLogs is a debugging helper function saving the test server's logs (last 3 minutes) into the specified file.
Note: Intended use is debugging of a test case. Most tests cases will not need this as part of their regular operation.
__Attention__: The created file is __not cleaned up automatically__