proxy-wasm / test-framework

WebAssembly for Proxies (test framework)
Apache License 2.0
16 stars 13 forks source link

Provide strict mode #4

Open PiotrSikora opened 4 years ago

PiotrSikora commented 4 years ago

In this mode (or maybe by default?) tests should fail if the extension is making unexpected hostcalls.

PiotrSikora commented 4 years ago

cc @agiachris

agiachris commented 4 years ago

I think this should be optional. Currently, the user has the option to mock parameters and returns from vm->host and vm<-host on specific host functions. We could also create an expectation over the host functions themselves (i.e. without considering the parameters/returns). Low-level mocking on host function parameters and returns should add the host function to the list of expected host calls. This will enable tracking of in-bound host function calls in a specified ordering. What do you think?