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.
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 location of gcloud via the GCLOUD_BIN environment variable.
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 // The service/module to deploy to. Read only. Service 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.
Click to show internal directories.
Click to hide internal directories.