Skip to content

Commit

Permalink
Merge pull request #1140 from pulumi/mikhailshilkov/more-upgrade-tests
Browse files Browse the repository at this point in the history
Enable more VPC upgrade tests
  • Loading branch information
mikhailshilkov authored Nov 3, 2023
2 parents 9340a4d + bb86cd0 commit 5852b89
Show file tree
Hide file tree
Showing 21 changed files with 15,596 additions and 17 deletions.
4 changes: 1 addition & 3 deletions examples/ts-lb-simple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
},
"dependencies": {
"@pulumi/aws": "^6.0.0",
"@pulumi/awsx": "latest",
"@pulumi/pulumi": "^3.0.0"
},
"peerDependencies": {
"@pulumi/awsx": "latest"
}
}
4 changes: 1 addition & 3 deletions examples/ts-lb-with-subnets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
},
"dependencies": {
"@pulumi/aws": "^6.0.0",
"@pulumi/pulumi": "^3.0.0"
},
"peerDependencies": {
"@pulumi/pulumi": "^3.0.0",
"@pulumi/awsx": "latest"
}
}
3 changes: 2 additions & 1 deletion examples/vpc/nodejs/custom-provider/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"name": "nodejs",
"devDependencies": {
"@types/node": "^14"
"@types/node": "^18"
},
"dependencies": {
"@pulumi/aws": "^6.0.0",
"@pulumi/awsx": "latest",
"@pulumi/pulumi": "^3.0.0"
}
}
5 changes: 3 additions & 2 deletions examples/vpc/nodejs/specific-vpc-layout/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"name": "nodejs",
"devDependencies": {
"@types/node": "^14"
"@types/node": "^18"
},
"dependencies": {
"@pulumi/pulumi": "^3.0.0"
"@pulumi/pulumi": "^3.0.0",
"@pulumi/awsx": "latest"
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"name": "nodejs",
"devDependencies": {
"@types/node": "^14"
"@types/node": "^18"
},
"dependencies": {
"@pulumi/awsx": "latest",
"@pulumi/pulumi": "^3.0.0"
}
}
3 changes: 2 additions & 1 deletion examples/vpc/nodejs/vpc-subnets-with-tags/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"name": "nodejs",
"devDependencies": {
"@types/node": "^14"
"@types/node": "^18"
},
"dependencies": {
"@pulumi/awsx": "latest",
"@pulumi/pulumi": "^3.0.0"
}
}
3 changes: 2 additions & 1 deletion examples/vpc/nodejs/vpc-with-service-endpoint/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"name": "nodejs",
"devDependencies": {
"@types/node": "^14"
"@types/node": "^18"
},
"dependencies": {
"@pulumi/awsx": "latest",
"@pulumi/pulumi": "^3.0.0"
}
}
18 changes: 13 additions & 5 deletions provider/provider_nodejs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,26 @@ func TestExamples(t *testing.T) {

"cloudtrail/nodejs",
"vpc/nodejs/default-args",
"vpc/nodejs/specific-vpc-layout",
"vpc/nodejs/vpc-with-service-endpoint",
"vpc/nodejs/vpc-multiple-similar-subnet-types",
"vpc/nodejs/vpc-subnets-with-tags",

// TODO[pulumi/pulumi-awsx#1114] this passes locally on Mac OS and Pulumi 3.86.0 but is failing in CI.
// "ts-nlb-simple",
// "ts-lb-simple",

// TODO[pulumi/pulumi-awsx#1112] skipping recording a few programs that time out locally after 20min.
// "ts-lb-simple",
// "ts-lb-with-subnets",
// "ts-lb-attach-lambda",
// "ts-lb-attach-ec2",

// TODO[pulumi/providertest#21] ecs/nodejs clobbers cloudtrail/nodejs.
// "ecs/nodejs"

// Skipping because it does not work on pre-2.x versions, so upgrade tests cannot run.
// "vpc/nodejs/custom-provider", // enableClassiclink and enableClassiclinkDnsSupport removed from outputs
// "ts-vpc-getDefaultVpc", // Property 'vpc' does not exist
// "ts-ecr-simple",

// Still need to try recording these:
//
Expand All @@ -57,13 +65,13 @@ func TestExamples(t *testing.T) {
// "vpc/nodejs/vpc-with-service-endpoint",
// "vpc/nodejs/vpc-multiple-similar-subnet-types",
// "vpc/nodejs/vpc-subnets-with-tags",
// "ts-ecr-simple", // docker.Patch -> docker.Context
}

for _, ex := range examples {
dir := filepath.Join("..", "examples", ex)
t.Run(ex, test(dir).Run)
}

}

func test(dir string, opts ...providertest.Option) *providertest.ProviderTest {
Expand All @@ -74,13 +82,13 @@ func test(dir string, opts ...providertest.Option) *providertest.ProviderTest {
providertest.UpgradeTestMode_Quick,
"Quick mode is only supported for providers written in Go at the moment"),

providertest.WithBaselineVersion("1.0.6"),
providertest.WithBaselineVersion("1.0.6"), // latest v1

// Ensure we use the same region for all tests - when recording and replaying.
providertest.WithConfig("aws:region", "us-west-2"),

providertest.WithExtraBaselineDependencies(map[string]string{
"aws": "5.42.0",
"aws": "5.42.0", // latest v5
}),
)

Expand Down

Large diffs are not rendered by default.

Loading

0 comments on commit 5852b89

Please sign in to comment.