Exemple #1
0
func mustDeploy(t testing.TB, c *heroku.Client, image string) {
	var (
		f DeployForm
	)

	f.Image = image

	if err := c.Post(ioutil.Discard, "/deploys", &f); err != nil {
		t.Fatal(err)
	}
}
Exemple #2
0
// Deploys an image for the app or fails.
func mustAppDeploy(t testing.TB, c *heroku.Client, appName string, image string) {
	var (
		f DeployForm
	)

	f.Image = image
	endpoint := fmt.Sprintf("/apps/%s/deploys", appName)

	if err := c.Post(ioutil.Discard, endpoint, &f); err != nil {
		t.Fatal(err)
	}
}