Skip to content

Commit

Permalink
Add quick tests to examples. (pulumi#221)
Browse files Browse the repository at this point in the history
  • Loading branch information
CyrusNajmabadi committed Feb 8, 2019
1 parent e8527bd commit d07ce22
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 10 deletions.
4 changes: 2 additions & 2 deletions aws-js-containers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ let service = new awsx.ecs.FargateService("nginx", {
taskDefinitionArgs: {
containers: {
nginx: {
image: awsx.ecs.Image.fromPath("./app"),
image: awsx.ecs.Image.fromPath("nginx", "./app"),
memory: 512,
portMappings: [listener],
},
Expand All @@ -17,4 +17,4 @@ let service = new awsx.ecs.FargateService("nginx", {
});

// export just the hostname property of the container frontend
exports.hostname = listener.endpoint().apply(e => `http:https://${e.hostname}`);
exports.hostname = listener.endpoint.apply(e => `http:https://${e.hostname}`);
2 changes: 1 addition & 1 deletion aws-js-containers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"dependencies": {
"@pulumi/pulumi": "latest",
"@pulumi/aws": "latest",
"@pulumi/aws-infra": "latest"
"@pulumi/awsx": "latest"
}
}
2 changes: 1 addition & 1 deletion aws-ts-airflow/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"dependencies": {
"@pulumi/pulumi": "latest",
"@pulumi/aws": "latest",
"@pulumi/aws-infra": "latest"
"@pulumi/awsx": "latest"
}
}
2 changes: 1 addition & 1 deletion aws-ts-containers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"dependencies": {
"@pulumi/pulumi": "latest",
"@pulumi/aws": "latest",
"@pulumi/aws-infra": "latest"
"@pulumi/awsx": "latest"
}
}
2 changes: 1 addition & 1 deletion aws-ts-eks-hello-world/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"dependencies": {
"@types/node": "latest",
"@pulumi/aws": "latest",
"@pulumi/aws-infra": "latest",
"@pulumi/awsx": "latest",
"@pulumi/kubernetes": "latest",
"@pulumi/eks": "latest",
"@pulumi/pulumi": "latest"
Expand Down
2 changes: 1 addition & 1 deletion aws-ts-eks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"dependencies": {
"@pulumi/pulumi": "latest",
"@pulumi/aws-infra": "latest",
"@pulumi/awsx": "latest",
"@pulumi/eks": "latest"
}
}
2 changes: 1 addition & 1 deletion aws-ts-thumbnailer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"dependencies": {
"@pulumi/pulumi": "latest",
"@pulumi/aws": "latest",
"@pulumi/aws-infra": "latest"
"@pulumi/awsx": "latest"
}
}
2 changes: 1 addition & 1 deletion aws-ts-url-shortener-cache-http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"dependencies": {
"@pulumi/pulumi": "latest",
"@pulumi/aws": "latest",
"@pulumi/aws-infra": "latest",
"@pulumi/awsx": "latest",
"@pulumi/cloud-aws": "latest",
"redis": "^2.8.0",
"express": "^4.16.3",
Expand Down
2 changes: 1 addition & 1 deletion aws-ts-voting-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dependencies": {
"@pulumi/pulumi": "latest",
"@pulumi/aws": "latest",
"@pulumi/aws-infra": "latest",
"@pulumi/awsx": "latest",
"@pulumi/cloud-aws": "latest"
}
}
15 changes: 15 additions & 0 deletions misc/test/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,20 @@ func TestExamples(t *testing.T) {
Overrides: overrides,
}

quickBase := base.With(integration.ProgramTestOptions{
Quick: true,
SkipRefresh: true,
})

quickTests := []integration.ProgramTestOptions{
quickBase.With(integration.ProgramTestOptions{
Dir: path.Join(cwd, "..", "..", "aws-js-containers"),
Config: map[string]string{
"aws:region": awsRegion,
},
}),
}

shortTests := []integration.ProgramTestOptions{
base.With(integration.ProgramTestOptions{
Dir: path.Join(cwd, "..", "..", "aws-js-s3-folder"),
Expand Down Expand Up @@ -264,6 +278,7 @@ func TestExamples(t *testing.T) {
var tests []integration.ProgramTestOptions
if testing.Short() {
tests = shortTests
tests = append(tests, quickTests...)
} else {
tests = longTests
}
Expand Down

0 comments on commit d07ce22

Please sign in to comment.