tests

package
v1.0.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertDirectoryPermissionsEqual

func AssertDirectoryPermissionsEqual(t *testing.T, path string, mode os.FileMode) bool

AssertDirectoryPermissionsEqual checks that all files in the specified path match the desired file mode. Uses a glob pattern to match.

func AssertFilePermissionsEqual

func AssertFilePermissionsEqual(t *testing.T, path string, want os.FileMode, got os.FileMode) bool

RequireErrorContains fails the test when the error doesn't contain AssertFilePermissionsEqual checks that the file permission bits are equal for the specified file.

func GRPCDisplayInstallationExpectedJSON added in v1.0.15

func GRPCDisplayInstallationExpectedJSON(bExpInst []byte) ([]byte, error)

GRPCDisplayInstallationExpectedJSON converts a json byte string from a porter.DisplayInstallation to one expected from a GRPC Installation

func GenerateDatabaseName added in v1.0.1

func GenerateDatabaseName(testName string) string

GenerateDatabaseName comes up with a valid mongodb database name from a Go test name.

func RequireErrorContains added in v1.0.1

func RequireErrorContains(t *testing.T, err error, substring string, msgAndArgs ...interface{})

the specified substring. This is less fragile than using require.EqualError

func RequireOutputContains added in v1.0.1

func RequireOutputContains(t *testing.T, output string, substring string, msgAndArgs ...interface{})

This is the same as require.Contains but it prints the output string without newlines escaped so that it's easier to read.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL