(t *testing.T)
| 110 | } |
| 111 | |
| 112 | func TestTransformQuantityToGooseFSUnit(t *testing.T) { |
| 113 | testQuantity1 := resource.MustParse("10Gi") |
| 114 | testQuantity2 := resource.MustParse("10M") |
| 115 | |
| 116 | tests := []struct { |
| 117 | name string |
| 118 | quantity *resource.Quantity |
| 119 | wantValue string |
| 120 | }{ |
| 121 | { |
| 122 | name: "test1 for TransformQuantityToGooseFSUnit", |
| 123 | quantity: &testQuantity1, |
| 124 | wantValue: "10GB", |
| 125 | }, |
| 126 | { |
| 127 | name: "test2 for TransformQuantityToGooseFSUnit", |
| 128 | quantity: &testQuantity2, |
| 129 | wantValue: "10M", |
| 130 | }, |
| 131 | } |
| 132 | for _, tt := range tests { |
| 133 | t.Run(tt.name, func(t *testing.T) { |
| 134 | if gotValue := TransformQuantityToGooseFSUnit(tt.quantity); gotValue != tt.wantValue { |
| 135 | t.Errorf("TransformQuantityToGooseFSUnit() = %v, want %v", gotValue, tt.wantValue) |
| 136 | } |
| 137 | }) |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | func TestTransformQuantityToEFCUnit(t *testing.T) { |
| 142 | testQuantity1 := resource.MustParse("10Gi") |
nothing calls this directly
no test coverage detected