Skip to content

Commit

Permalink
test(examples): add EKSSmokeTest to ExtraRuntimeValidation in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
metral committed May 16, 2019
1 parent e843fbf commit 77982ec
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions nodejs/eks/examples/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ import (

"github.com/stretchr/testify/assert"

"github.com/pulumi/pulumi-eks/utils"
"github.com/pulumi/pulumi/pkg/testing/integration"
)

func Test_Examples(t *testing.T) {
t.Parallel()
region := os.Getenv("AWS_REGION")
if region == "" {
t.Skipf("Skipping test due to missing AWS_REGION environment variable")
Expand All @@ -47,6 +49,13 @@ func Test_Examples(t *testing.T) {
"@pulumi/eks",
},
ExpectRefreshChanges: true,
ExtraRuntimeValidation: func(t *testing.T, info integration.RuntimeValidationStackInfo) {
utils.RunEKSSmokeTest(t,
info.Deployment.Resources,
info.Outputs["kubeconfig1"],
info.Outputs["kubeconfig2"],
)
},
},
{
Dir: path.Join(cwd, "./nodegroup"),
Expand All @@ -57,6 +66,13 @@ func Test_Examples(t *testing.T) {
"@pulumi/eks",
},
ExpectRefreshChanges: true,
ExtraRuntimeValidation: func(t *testing.T, info integration.RuntimeValidationStackInfo) {
utils.RunEKSSmokeTest(t,
info.Deployment.Resources,
info.Outputs["kubeconfig1"],
info.Outputs["kubeconfig2"],
)
},
},
{
Dir: path.Join(cwd, "./private-cluster"),
Expand All @@ -67,6 +83,12 @@ func Test_Examples(t *testing.T) {
"@pulumi/eks",
},
ExpectRefreshChanges: true,
ExtraRuntimeValidation: func(t *testing.T, info integration.RuntimeValidationStackInfo) {
utils.RunEKSSmokeTest(t,
info.Deployment.Resources,
info.Outputs["kubeconfig"],
)
},
},
{
Dir: path.Join(cwd, "./tags"),
Expand All @@ -77,6 +99,13 @@ func Test_Examples(t *testing.T) {
"@pulumi/eks",
},
ExpectRefreshChanges: true,
ExtraRuntimeValidation: func(t *testing.T, info integration.RuntimeValidationStackInfo) {
utils.RunEKSSmokeTest(t,
info.Deployment.Resources,
info.Outputs["kubeconfig1"],
info.Outputs["kubeconfig2"],
)
},
},
}

Expand Down

0 comments on commit 77982ec

Please sign in to comment.