Test and formatting
MODIFY
gcp-ts-cloudrun/README.md
gcp-ts-cloudrun/README.md
# Google Cloud Run
-An example of deploying a custom Docker image into Google Cloud Run service using TypeScript. Our image builds a simple HelloWorld web application in Ruby. You can change it any language and runtime that can run on Linux and serve HTTP traffic.
+An example of deploying a custom Docker image into Google Cloud Run service using TypeScript. Our image builds a simple HelloWorld web application in Ruby. You may change it to any language and runtime that can run on Linux and serve HTTP traffic.
## Prerequisites
-0. [Ensure you have the latest Node.js and NPM](https://nodejs.org/en/download/)
+1. [Ensure you have the latest Node.js and NPM](https://nodejs.org/en/download/)
2. [Install the Pulumi CLI](https://www.pulumi.com/docs/get-started/install/)
3. [Configure Pulumi to access your GCP account](https://www.pulumi.com/docs/intro/cloud-providers/gcp/setup/)
4. [Install Docker](https://docs.docker.com/install/)

MODIFY
gcp-ts-cloudrun/index.ts
gcp-ts-cloudrun/index.ts
-// Copyright 2016-2019, Pulumi Corporation. All rights reserved.
+// Copyright 2016-2020, Pulumi Corporation. All rights reserved.
import * as pulumi from "@pulumi/pulumi";
import * as docker from "@pulumi/docker";
@@ -20,9 +20,9 @@ const helloService = new gcp.cloudrun.Service("hello", {
template: {
spec: {
containers: [
- { image: "gcr.io/cloudrun/hello" }
- ]
- }
+ { image: "gcr.io/cloudrun/hello" },
+ ],
+ },
},
}, { dependsOn: enableCloudRun });

MODIFY
misc/test/examples_test.go
misc/test/examples_test.go
@@ -1062,6 +1062,22 @@ func TestAccGcpTsServerlessRaw(t *testing.T) {
integration.ProgramTest(t, &test)
}
+func TestAccGcpTsCloudRun(t *testing.T) {
+ test := getGoogleBase(t).
+ With(integration.ProgramTestOptions{
+ Dir: path.Join(getCwd(t), "..", "..", "gcp-ts-cloudrun"),
+ ExtraRuntimeValidation: func(t *testing.T, stack integration.RuntimeValidationStackInfo) {
+ endpoint := stack.Outputs["rubyUrl"].(string)
+ assertHTTPResult(t, endpoint, nil, func(body string) bool {
+ return assert.Contains(t, body, "Hello Pulumi!")
+ })
+ },
+ })
+
+ integration.ProgramTest(t, &test)
+}
+
+
func TestAccPacketPyWebserver(t *testing.T) {
test := getBaseOptions(t).
With(integration.ProgramTestOptions{

Test and formatting