Documentation ¶
Overview ¶
Package aeintegrate facilitates end-to-end testing against the production Google App Engine.
This is a specialized tool that could be used in addition to unit tests. It calls the `gcloud app` command directly.
aedeploy (go get google.golang.org/appengine/cmd/aedeploy) and gcloud (https://cloud.google.com/sdk) must be installed. You must be authorized via the gcloud command-line tool (`gcloud auth login`).
You may specify the locations of aedeploy and/or gcloud via the AEDEPLOY_BIN and GCLOUD_BIN environment variables, respectively.
Sample usage with `go test`:
package myapp import ( "testing" "google.golang.org/appengine/aeintegrate" ) func TestApp(t *testing.T) { t.Parallel() app := aeintegrate.App{Name: "A", Dir: "app"}, if err := app.Deploy(); err != nil { t.Fatalf("could not deploy app: %v", err) } defer app.Cleanup() resp, err := app.Get("/") ... }
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { // Name is an ID, used for logging and to generate a unique version to this run. Name string // The root directory containing the app's source code. Dir string // The configuration (app.yaml) file, relative to Dir. Defaults to "app.yaml". AppYaml string // The project to deploy to. ProjectID string // Additional runtime environment variable overrides for the app. Env map[string]string // contains filtered or unexported fields }
App describes an App Engine application.
func (*App) Deploy ¶
Deploy deploys the application to App Engine. If the deployment fails, it tries to clean up the failed deployment.