Skip to content

Commit

Permalink
test ci
Browse files Browse the repository at this point in the history
Signed-off-by: husharp <[email protected]>
  • Loading branch information
HuSharp committed Jul 10, 2023
1 parent 906850b commit 7e04ee1
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions client/resource_group/controller/model_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,7 @@ import (
)

func TestGetRUValueFromConsumption(t *testing.T) {
// Positive test case
re := require.New(t)
custom := &rmpb.Consumption{RRU: 2.5, WRU: 3.5}
typ := rmpb.RequestUnitType_RU
expected := float64(6)

result := getRUValueFromConsumption(custom, typ)
re.Equal(expected, result)

// When custom is nil
custom = nil
expected = float64(0)

result = getRUValueFromConsumption(custom, typ)
re.Equal(expected, result)

// When typ is not RU
custom = &rmpb.Consumption{RRU: 2.5, WRU: 3.5}
typ = rmpb.RequestUnitType_RU
expected = float64(0)

result = getRUValueFromConsumption(custom, typ)
re.Equal(expected, result)
require.True(t, false)
}

func TestGetRUTokenBucketSetting(t *testing.T) {
Expand Down

0 comments on commit 7e04ee1

Please sign in to comment.