Example #1
0
func appsTransferTest(t *testing.T, params *utils.DeisTestConfig) {
	user := utils.GetGlobalConfig()
	user.UserName, user.Password = "******", "test"
	user.AppName = "transfer-test"
	user.NewOwner = params.UserName
	utils.Execute(t, authRegisterCmd, user, false, "")
	utils.Execute(t, authLoginCmd, user, false, "")
	utils.Execute(t, appsCreateCmdNoRemote, user, false, "")
	utils.Execute(t, appsTransferCmd, user, false, "")
	utils.Execute(t, appsInfoCmd, user, true, "403 FORBIDDEN")
	utils.Execute(t, authLoginCmd, params, false, "")
	params.AppName = user.AppName
	utils.CheckList(t, appsInfoCmd, params, params.UserName, false)
}
Example #2
0
// buildsCreateTest uses the `deis builds:create` (or `deis pull`) command
// to promote a build from an existing docker image.
func buildsCreateTest(t *testing.T, params *utils.DeisTestConfig) {
	params.AppName = "deispullsample"
	params.ImageID = "deis/example-go:latest"
	params.ExampleApp = "example-deis-pull"
	if err := os.Mkdir(params.ExampleApp, 0755); err != nil {
		t.Fatal(err)
	}
	if err := utils.Chdir(params.ExampleApp); err != nil {
		t.Fatal(err)
	}
	utils.Execute(t, appsCreateCmdNoRemote, params, false, "")
	utils.Execute(t, buildsCreateCmd, params, false, "")
	if err := utils.Chdir(".."); err != nil {
		t.Fatal(err)
	}
}