Documentation ¶
Index ¶
- Variables
- func AppsDestroyTest(t *testing.T, params *DeisTestConfig)
- func AuthCancel(t *testing.T, params *DeisTestConfig)
- func AuthPasswd(t *testing.T, params *DeisTestConfig, password string)
- func BuildTag() string
- func Chdir(app string) error
- func CheckList(t *testing.T, cmd string, params interface{}, contain string, notflag bool)
- func CreateFile(path string) error
- func Curl(t *testing.T, params *DeisTestConfig)
- func Execute(t *testing.T, cmd string, params interface{}, failFlag bool, expect string)
- func GetRandomApp() string
- func HostAddress() string
- func Hostname() string
- func NewID() string
- func RandomPort() string
- func Rmdir(app string) error
- func RunCommandWithStdoutStderr(cmd *exec.Cmd) (bytes.Buffer, bytes.Buffer, error)
- type DeisTestConfig
Constants ¶
This section is empty.
Variables ¶
var Deis = "deis "
Deis points to the CLI used to run tests.
Functions ¶
func AppsDestroyTest ¶ added in v0.11.0
func AppsDestroyTest(t *testing.T, params *DeisTestConfig)
AppsDestroyTest destroys a Deis app and checks that it was successful.
func AuthCancel ¶ added in v0.11.0
func AuthCancel(t *testing.T, params *DeisTestConfig)
AuthCancel tests whether `deis auth:cancel` destroys a user's account.
func AuthPasswd ¶ added in v0.15.0
func AuthPasswd(t *testing.T, params *DeisTestConfig, password string)
AuthPasswd tests whether `deis auth:passwd` updates a user's password.
func BuildTag ¶ added in v0.12.0
func BuildTag() string
BuildTag returns the $BUILD_TAG environment variable or `git rev-parse` output.
func CheckList ¶ added in v0.11.0
CheckList executes a command and optionally tests whether its output does or does not contain a given string.
func CreateFile ¶
CreateFile creates an empty file at the specified path.
func Curl ¶ added in v0.11.0
func Curl(t *testing.T, params *DeisTestConfig)
Curl connects to a Deis endpoint to see if the example app is running.
func Execute ¶ added in v0.11.0
Execute takes command string and parameters required to execute the command, a failflag to check whether the command is expected to fail, and an expect string to check whether the command has failed according to failflag.
If failflag is true and the command failed, check the stdout and stderr for the expect string.
func GetRandomApp ¶ added in v0.11.0
func GetRandomApp() string
GetRandomApp returns a known working example app at random for testing.
func HostAddress ¶ added in v0.12.0
func HostAddress() string
HostAddress returns the host IP for accessing etcd and Deis services.
func Hostname ¶ added in v0.13.0
func Hostname() string
Hostname returns the hostname of the machine running the container, *not* the local machine We infer the hostname because we don't necessarily know how to log in.
func NewID ¶ added in v0.11.0
func NewID() string
NewID returns the first part of a random RFC 4122 UUID See http://play.golang.org/p/4FkNSiUDMg
func RandomPort ¶ added in v0.12.0
func RandomPort() string
RandomPort returns an unused TCP listen port on the host.
Types ¶
type DeisTestConfig ¶ added in v0.11.0
type DeisTestConfig struct { AuthKey string Hosts string Domain string SSHKey string ClusterName string UserName string Password string Email string ExampleApp string AppName string ProcessNum string ImageID string Version string AppUser string }
DeisTestConfig allows tests to be repeated against different targets, with different example apps, using specific credentials, and so on.
func GetGlobalConfig ¶ added in v0.11.0
func GetGlobalConfig() *DeisTestConfig
GetGlobalConfig returns a test configuration object.