-
Notifications
You must be signed in to change notification settings - Fork 0
DesignDocs
Ryo Okubo edited this page Aug 28, 2016
·
5 revisions
ts_mruby calls atscppapi, wrapped TS API by C++ classes basically.
Apache Traffic Server supports various hooks.
ts_mruby uses READ_REQUEST_HDR_HOOK
mainly and response body transform
if necessary. other hooks are unsupported yet.
All of thread share mruby scirpts as string. And each thread has own mruby VM(mrb_state) and RProc's poinging to compiled code.
ts_mruby has unittest and functional test.
-
test/
is a directory for unit test code. - Using googletest and googlemock as testing framework.
- Add
virtual
qualifier to enable mocking when only compiling test code. - Implement empty atscppapi methods to avoid redundant linking to libatscppapi.so
-
spec/
is a directory for functional test code. - Run ATS with ts_mruby and simple mruby scripts.
- And generate HTTP requests to the ATS to examine whether responses is expected.
- Using capybara to headless test and factory_girl as a fixture replacement.