feat: add quota limitation to organizations, users, providers and applications (#1339)

This commit is contained in:
WangGuan
2022-11-29 11:01:41 +08:00
committed by GitHub
parent 8890d1d7c7
commit 7867060b71
8 changed files with 110 additions and 0 deletions

View File

@ -93,3 +93,19 @@ func TestGetConfBool(t *testing.T) {
})
}
}
func TestGetConfigQuota(t *testing.T) {
scenarios := []struct {
description string
expected *Quota
}{
{"default", &Quota{-1, -1, -1, -1}},
}
err := beego.LoadAppConfig("ini", "app.conf")
assert.Nil(t, err)
for _, scenery := range scenarios {
quota := GetConfigQuota()
assert.Equal(t, scenery.expected, quota)
}
}