Documentation ¶
Index ¶
- type Tester
- func (t Tester) CurrentNamespace() string
- func (t Tester) ListInstallations(allNamespaces bool, namespace string, name string, labels []string) ([]claims.Installation, error)
- func (t Tester) MakeTestBundle(name string, ref string)
- func (t Tester) PrepareTestBundle()
- func (t Tester) RequireInstallationExists(namespace string, name string) claims.Installation
- func (t Tester) RequireInstallationInList(namespace, name string, list []claims.Installation) claims.Installation
- func (t Tester) RequireInstallationNotFound(namespace string, name string)
- func (t Tester) RequireNotFoundReturned(err error)
- func (t Tester) RequirePorter(args ...string) string
- func (t Tester) RunPorter(args ...string) (string, error)
- func (t Tester) ShowInstallation(namespace string, name string) (claims.Installation, error)
- func (t Tester) Teardown()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tester ¶
type Tester struct { // TestDir is the temp directory created for the test. TestDir string // PorterHomeDir is the temp PORTER_HOME directory for the test. PorterHomeDir string // RepoRoot is the root of the porter repository. // Useful for constructing paths that won't break when the test is moved. RepoRoot string // T is the test helper. T *testing.T // contains filtered or unexported fields }
func NewTest ¶
NewTest sets up for a smoke test.
Always defer Tester.Teardown(), even when an error is returned.
func (Tester) CurrentNamespace ¶
CurrentNamespace configured in config.toml
func (Tester) ListInstallations ¶
func (Tester) MakeTestBundle ¶
func (Tester) PrepareTestBundle ¶
func (t Tester) PrepareTestBundle()
PrepareTestBundle ensures that the mybuns test bundle has been built.
func (Tester) RequireInstallationExists ¶
func (t Tester) RequireInstallationExists(namespace string, name string) claims.Installation
func (Tester) RequireInstallationInList ¶
func (t Tester) RequireInstallationInList(namespace, name string, list []claims.Installation) claims.Installation
func (Tester) RequireInstallationNotFound ¶
func (Tester) RequireNotFoundReturned ¶
func (Tester) RequirePorter ¶
Run a porter command and fail the test if the command returns an error. Returns stdout.
func (Tester) RunPorter ¶
Run a porter command returning stdout and stderr as an error if the command fails.
func (Tester) ShowInstallation ¶
Click to show internal directories.
Click to hide internal directories.