Skip to content

Commit

Permalink
Adding the DigitalOcean example to CI runs
Browse files Browse the repository at this point in the history
  • Loading branch information
stack72 committed Jul 15, 2019
1 parent 8b15d3d commit 0cf983e
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 2 deletions.
2 changes: 1 addition & 1 deletion digitalocean-ts-loadbalanced-droplets/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion digitalocean-ts-loadbalanced-droplets/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "webserver-linode",
"version": "0.1.0",
"main": "index.js",
"dependencies": {
"@pulumi/pulumi": "latest",
"@pulumi/digitalocean": "latest"
Expand Down
19 changes: 19 additions & 0 deletions digitalocean-ts-loadbalanced-droplets/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
10 changes: 10 additions & 0 deletions misc/test/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{},
Expand Down

0 comments on commit 0cf983e

Please sign in to comment.