Skip to content

Commit

Permalink
Add test coverage for VimMachineService
Browse files Browse the repository at this point in the history
  • Loading branch information
laozc committed Dec 18, 2023
1 parent 919c03f commit 6cdadaa
Show file tree
Hide file tree
Showing 4 changed files with 592 additions and 227 deletions.
3 changes: 3 additions & 0 deletions pkg/context/fake/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ const (
// Clusterv1a2UUID is the UID of the fake CAPI v1alpha3 Cluster resource.
Clusterv1a2UUID = "00000000-0000-0000-0000-000000000000"

// InfrastructureRefName is the name of the InfrastructureRef in fake CAPI Cluster resource.
InfrastructureRefName = "fake-cluster-infrastructure-ref"

VSphereClusterName = "fake-vsphere-cluster"

// VSphereClusterUUID is the UID of the fake VSphereCluster resource.
Expand Down
5 changes: 5 additions & 0 deletions pkg/context/fake/fake_cluster_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package fake
import (
"context"

corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"

Expand Down Expand Up @@ -63,6 +64,10 @@ func newClusterV1() clusterv1.Cluster {
CIDRBlocks: []string{ServiceCIDR},
},
},
InfrastructureRef: &corev1.ObjectReference{
Namespace: Namespace,
Name: InfrastructureRefName,
},
},
}
}
Expand Down
40 changes: 0 additions & 40 deletions pkg/services/services_suite_test.go

This file was deleted.

Loading

0 comments on commit 6cdadaa

Please sign in to comment.