allow kb granularity for lua shared dicts (#6750)
Update internal/ingress/controller/template/configmap.go Co-authored-by: Ricardo Katz <rikatz@users.noreply.github.com> Co-authored-by: Ricardo Katz <rikatz@users.noreply.github.com>
This commit is contained in:
parent
b510b0e930
commit
b591adac48
7 changed files with 140 additions and 34 deletions
|
|
@ -214,7 +214,7 @@ func TestBuildLuaSharedDictionaries(t *testing.T) {
|
|||
// config lua dict
|
||||
cfg := config.Configuration{
|
||||
LuaSharedDicts: map[string]int{
|
||||
"configuration_data": 10, "certificate_data": 20,
|
||||
"configuration_data": 10240, "certificate_data": 20480,
|
||||
},
|
||||
}
|
||||
actual := buildLuaSharedDictionaries(cfg, invalidType)
|
||||
|
|
@ -255,13 +255,13 @@ func TestBuildLuaSharedDictionaries(t *testing.T) {
|
|||
func TestLuaConfigurationRequestBodySize(t *testing.T) {
|
||||
cfg := config.Configuration{
|
||||
LuaSharedDicts: map[string]int{
|
||||
"configuration_data": 10, "certificate_data": 20,
|
||||
"configuration_data": 10240, "certificate_data": 20480,
|
||||
},
|
||||
}
|
||||
|
||||
size := luaConfigurationRequestBodySize(cfg)
|
||||
if size != "21" {
|
||||
t.Errorf("expected the size to be 20 but got: %v", size)
|
||||
if size != "21M" {
|
||||
t.Errorf("expected the size to be 21M but got: %v", size)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue