diff --git a/digitalocean-ts-loadbalanced-droplets/index.ts b/digitalocean-ts-loadbalanced-droplets/index.ts index 60abb21a7..679986cdf 100644 --- a/digitalocean-ts-loadbalanced-droplets/index.ts +++ b/digitalocean-ts-loadbalanced-droplets/index.ts @@ -10,7 +10,7 @@ const userData = sudo apt-get update sudo apt-get install -y nginx`; const droplets = []; -for (let i = 0; i < dropletCount; i ++) { +for (let i = 0; i < dropletCount; i++) { let nameTag = new digitalocean.Tag(`web-${i}`); droplets.push(new digitalocean.Droplet(`web-${i}`, { image: "ubuntu-18-04-x64", diff --git a/digitalocean-ts-loadbalanced-droplets/package.json b/digitalocean-ts-loadbalanced-droplets/package.json index 488ff859e..f7fc707af 100644 --- a/digitalocean-ts-loadbalanced-droplets/package.json +++ b/digitalocean-ts-loadbalanced-droplets/package.json @@ -1,7 +1,6 @@ { "name": "webserver-linode", "version": "0.1.0", - "main": "index.js", "dependencies": { "@pulumi/pulumi": "latest", "@pulumi/digitalocean": "latest" diff --git a/digitalocean-ts-loadbalanced-droplets/tsconfig.json b/digitalocean-ts-loadbalanced-droplets/tsconfig.json new file mode 100644 index 000000000..ae4e90d4b --- /dev/null +++ b/digitalocean-ts-loadbalanced-droplets/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "outDir": "bin", + "target": "es6", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true, + "strictNullChecks": true + }, + "files": [ + "index.ts" + ] +} diff --git a/misc/test/examples_test.go b/misc/test/examples_test.go index a00031704..b8844e4fe 100644 --- a/misc/test/examples_test.go +++ b/misc/test/examples_test.go @@ -582,6 +582,16 @@ func TestExamples(t *testing.T) { }, }), + base.With(integration.ProgramTestOptions{ + Dir: path.Join(cwd, "..", "..", "digitalocean-ts-loadbalanced-droplets"), + Config: map[string]string{}, + ExtraRuntimeValidation: func(t *testing.T, stack integration.RuntimeValidationStackInfo) { + assertHTTPResult(t, stack.Outputs["endpoint"].(string), func(body string) bool { + return assert.Contains(t, body, "Welcome to nginx!") + }) + }, + }), + base.With(integration.ProgramTestOptions{ Dir: path.Join(cwd, "..", "..", "linode-js-webserver"), Config: map[string]string{},