Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Commit

Permalink
test: adds a unit test for no params
Browse files Browse the repository at this point in the history
  • Loading branch information
faiq committed Mar 29, 2024
1 parent 0d2b906 commit 00a0eb2
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions pkg/handlers/generic/lifecycle/utils/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,29 @@ func TestCreateStorageClass(t *testing.T) {
provisioner: v1alpha1.NutanixProvisioner,
defaultsNamespace: "default",
},
{
name: "nutanix defaults",
storageConfig: v1alpha1.StorageClassConfig{
Name: "nutanix-volumes",
ReclaimPolicy: v1alpha1.VolumeReclaimDelete,
VolumeBindingMode: v1alpha1.VolumeBindingWaitForFirstConsumer,
},
expectedStorageClass: &storagev1.StorageClass{
TypeMeta: metav1.TypeMeta{
Kind: kindStorageClass,
APIVersion: storagev1.SchemeGroupVersion.String(),
},
ObjectMeta: metav1.ObjectMeta{
Name: "nutanix-volumes",
Namespace: "default",
},
ReclaimPolicy: ptr.To(corev1.PersistentVolumeReclaimDelete),
VolumeBindingMode: ptr.To(storagev1.VolumeBindingWaitForFirstConsumer),
Provisioner: string(v1alpha1.NutanixProvisioner),
},
provisioner: v1alpha1.NutanixProvisioner,
defaultsNamespace: "default",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down

0 comments on commit 00a0eb2

Please sign in to comment.