mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-26 20:26:13 +01:00
test: fix TestIsNegative (#8783)
Signed-off-by: He Weiwei <hweiwei@vmware.com>
This commit is contained in:
parent
b47b30db23
commit
311028be37
@ -77,8 +77,12 @@ func (suite *ResourcesSuite) TestZero() {
|
||||
}
|
||||
|
||||
func (suite *ResourcesSuite) TestIsNegative() {
|
||||
suite.EqualValues([]ResourceName{ResourceStorage}, IsNegative(ResourceList{ResourceStorage: -100, ResourceCount: 100}))
|
||||
suite.EqualValues([]ResourceName{ResourceStorage, ResourceCount}, IsNegative(ResourceList{ResourceStorage: -100, ResourceCount: -100}))
|
||||
suite.Len(IsNegative(ResourceList{ResourceStorage: -100, ResourceCount: 100}), 1)
|
||||
suite.Contains(IsNegative(ResourceList{ResourceStorage: -100, ResourceCount: 100}), ResourceStorage)
|
||||
|
||||
suite.Len(IsNegative(ResourceList{ResourceStorage: -100, ResourceCount: -100}), 2)
|
||||
suite.Contains(IsNegative(ResourceList{ResourceStorage: -100, ResourceCount: -100}), ResourceStorage)
|
||||
suite.Contains(IsNegative(ResourceList{ResourceStorage: -100, ResourceCount: -100}), ResourceCount)
|
||||
}
|
||||
|
||||
func TestRunResourcesSuite(t *testing.T) {
|
||||
|
Loading…
Reference in New Issue
Block a user