Skip to content

Commit

Permalink
Unit test improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
vr4manta committed Mar 1, 2024
1 parent 27ab93f commit 698f387
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 67 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func (v VSphereProviderConfig) getWorkspaceFromFailureDomain(failureDomain *conf
return workspace
}

// getTemplateName returns the name of the name of the template
// getTemplateName returns the name of the name of the template.
func getTemplateName(template string) string {
if strings.Contains(template, "/") {
return template[strings.LastIndex(template, "/")+1:]
Expand Down
3 changes: 0 additions & 3 deletions pkg/webhooks/controlplanemachineset/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,6 @@ var _ = BeforeSuite(func() {
Expect(err).NotTo(HaveOccurred())
Expect(k8sClient).NotTo(BeNil())

// infrastructure := configv1builder.Infrastructure().AsAWS("cluster", "us-east-1").WithName("cluster").Build()
// Expect(k8sClient.Create(ctx, infrastructure)).To(Succeed())

// CEL requires Kube 1.25 and above, so check for the minimum server version.
discoveryClient, err := discovery.NewDiscoveryClientForConfig(cfg)
Expect(err).ToNot(HaveOccurred())
Expand Down

0 comments on commit 698f387

Please sign in to comment.