MCPcopy
hub / github.com/fluid-cloudnative/fluid / TestTransformQuantityToJindoUnit

Function TestTransformQuantityToJindoUnit

pkg/utils/quantity_test.go:89–110  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

87}
88
89func TestTransformQuantityToJindoUnit(t *testing.T) {
90 testQuantity1 := resource.MustParse("5Gi")
91
92 tests := []struct {
93 name string
94 quantity *resource.Quantity
95 wantValue string
96 }{
97 {
98 name: "test1 for TransformQuantityToJindoUnit",
99 quantity: &testQuantity1,
100 wantValue: "5g",
101 },
102 }
103 for _, tt := range tests {
104 t.Run(tt.name, func(t *testing.T) {
105 if gotValue := TransformQuantityToJindoUnit(tt.quantity); gotValue != tt.wantValue {
106 t.Errorf("TransformQuantityToJindoUnit() = %v, want %v", gotValue, tt.wantValue)
107 }
108 })
109 }
110}
111
112func TestTransformQuantityToGooseFSUnit(t *testing.T) {
113 testQuantity1 := resource.MustParse("10Gi")

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected