Open jpswinski opened 2 years ago
Some Lua endpoints have logic bugs in their failure case handling that hasn't been caught yet because we have not hit the failure cases.
The code needs to be fixed, but there also needs to be tests written to hit these failure cases and verify that the fixes are working.
Here are some where userlog has not been defined:
userlog
https://github.com/ICESat2-SlideRule/sliderule/blob/019d660d9f48f8acdcb1b20bf329179202414462/scripts/endpoints/h5.lua#L34-L37
https://github.com/ICESat2-SlideRule/sliderule/blob/019d660d9f48f8acdcb1b20bf329179202414462/scripts/endpoints/h5p.lua#L38-L41
Also, need to check if the param table is not nil because an invalid json string could cause it to return empty.
The self test test_luaerror.py is failing because of the premature termination of the connection due to the overflow of the client request buffers.
test_luaerror.py
Some Lua endpoints have logic bugs in their failure case handling that hasn't been caught yet because we have not hit the failure cases.
The code needs to be fixed, but there also needs to be tests written to hit these failure cases and verify that the fixes are working.
Here are some where
userlog
has not been defined:https://github.com/ICESat2-SlideRule/sliderule/blob/019d660d9f48f8acdcb1b20bf329179202414462/scripts/endpoints/h5.lua#L34-L37
https://github.com/ICESat2-SlideRule/sliderule/blob/019d660d9f48f8acdcb1b20bf329179202414462/scripts/endpoints/h5p.lua#L38-L41
Also, need to check if the param table is not nil because an invalid json string could cause it to return empty.