Skip to content

Commit

Permalink
Add vm extension test to other E2E tests
Browse files Browse the repository at this point in the history
  • Loading branch information
willie-yao committed Sep 26, 2022
1 parent a6605dd commit d755da3
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 4 deletions.
57 changes: 55 additions & 2 deletions test/e2e/azure_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ var _ = Describe("Workload cluster creation", func() {
Namespace: namespace,
VMName: clusterName + "-md-0",
ClusterName: clusterName,
SkipCleanup: skipCleanup,
}
})
})
Expand Down Expand Up @@ -320,6 +319,17 @@ var _ = Describe("Workload cluster creation", func() {
},
}, result)

By("Verifying a VM extension is present on the node", func() {
AzureVMExtensionsSpec(ctx, func() AzureVMExtensionsSpecInput {
return AzureVMExtensionsSpecInput{
BootstrapClusterProxy: bootstrapClusterProxy,
Namespace: namespace,
VMName: clusterName + "-md-0",
ClusterName: clusterName,
}
})
})

By("Creating an accessible ipv6 load balancer", func() {
AzureLBSpec(ctx, func() AzureLBSpecInput {
return AzureLBSpecInput{
Expand Down Expand Up @@ -376,7 +386,6 @@ var _ = Describe("Workload cluster creation", func() {
Namespace: namespace,
VMName: clusterName + "-mp-0",
ClusterName: clusterName,
SkipCleanup: skipCleanup,
}
})
})
Expand Down Expand Up @@ -469,6 +478,17 @@ var _ = Describe("Workload cluster creation", func() {
Args: []string{"--server-side"},
}, result)

By("Verifying a VM extension is present on the node", func() {
AzureVMExtensionsSpec(ctx, func() AzureVMExtensionsSpecInput {
return AzureVMExtensionsSpecInput{
BootstrapClusterProxy: bootstrapClusterProxy,
Namespace: namespace,
VMName: clusterName + "-md-0",
ClusterName: clusterName,
}
})
})

By("Running a GPU-based calculation", func() {
AzureGPUSpec(ctx, func() AzureGPUSpecInput {
return AzureGPUSpecInput{
Expand Down Expand Up @@ -513,6 +533,17 @@ var _ = Describe("Workload cluster creation", func() {
},
}, result)

By("Verifying a VM extension is present on the node", func() {
AzureVMExtensionsSpec(ctx, func() AzureVMExtensionsSpecInput {
return AzureVMExtensionsSpecInput{
BootstrapClusterProxy: bootstrapClusterProxy,
Namespace: namespace,
VMName: clusterName + "-md-0",
ClusterName: clusterName,
}
})
})

By("Creating an accessible load balancer", func() {
AzureLBSpec(ctx, func() AzureLBSpecInput {
return AzureLBSpecInput{
Expand Down Expand Up @@ -599,6 +630,17 @@ var _ = Describe("Workload cluster creation", func() {
},
}, result)

By("Verifying a VM extension is present on the node", func() {
AzureVMExtensionsSpec(ctx, func() AzureVMExtensionsSpecInput {
return AzureVMExtensionsSpecInput{
BootstrapClusterProxy: bootstrapClusterProxy,
Namespace: namespace,
VMName: clusterName + "-md-0",
ClusterName: clusterName,
}
})
})

// dual-stack external IP for dual-stack clusters is not yet supported
// first ip family in ipFamilies is used for the primary clusterIP and cloud-provider
// determines the elb/ilb ip family based on the primary clusterIP
Expand Down Expand Up @@ -662,6 +704,17 @@ var _ = Describe("Workload cluster creation", func() {
},
}, result)

By("Verifying a VM extension is present on the node", func() {
AzureVMExtensionsSpec(ctx, func() AzureVMExtensionsSpecInput {
return AzureVMExtensionsSpecInput{
BootstrapClusterProxy: bootstrapClusterProxy,
Namespace: namespace,
VMName: clusterName + "-md-0",
ClusterName: clusterName,
}
})
})

By("PASSED!")
})
})
Expand Down
1 change: 0 additions & 1 deletion test/e2e/azure_vmextensions.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ type AzureVMExtensionsSpecInput struct {
Namespace *corev1.Namespace
VMName string
ClusterName string
SkipCleanup bool
}

// AzureVMExtensionsSpec implements a test that verifies VM extensions are created and deleted.
Expand Down
1 change: 0 additions & 1 deletion test/e2e/azure_vmssextensions.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ type AzureVMSSExtensionsSpecInput struct {
Namespace *corev1.Namespace
VMName string
ClusterName string
SkipCleanup bool
}

// AzureVMSSExtensionsSpec implements a test that verifies VM extensions are created and deleted.
Expand Down

0 comments on commit d755da3

Please sign in to comment.