set /configuration client body size dynamically

This commit is contained in:
Elvin Efendi 2019-08-14 22:03:17 -04:00
parent b21c721196
commit 6a293c7e11
3 changed files with 62 additions and 33 deletions

View file

@ -225,6 +225,19 @@ func TestBuildLuaSharedDictionaries(t *testing.T) {
}
}
func TestLuaConfigurationRequestBodySize(t *testing.T) {
cfg := config.Configuration{
LuaSharedDicts: map[string]int{
"configuration_data": 10, "certificate_data": 20,
},
}
size := luaConfigurationRequestBodySize(cfg)
if "21" != size {
t.Errorf("expected the size to be 20 but got: %v", size)
}
}
func TestFormatIP(t *testing.T) {
cases := map[string]struct {
Input, Output string