OpenFn / core

The central job processing module used in OpenFn v1.

Home Page:https://www.openfn.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Drop support for test mode?

taylordowns2000 opened this issue · comments

We'd provided an option for test mode which would try to intercept http requests made with request (so... lots of language-packages until recently) but that no longer works with axios and request is deprecated. We had used https://www.npmjs.com/package/mitm , but after a hard look it feels like this really shouldn't be the responsibility of core.

I'd move to drop support for test mode and let folks set up their own proxies with axios if they really want. Thoughts @stuartc , @lakhassane , @chaiwa-berian ?

100% agree, I think it would be core's responsibility to pass parameters into the language pack and have that specific adaptor be in charge of what 'test mode' means in that context.

Totally makes sense we've outgrown this approach.

So what I'm envisaging is that (perhaps for now), a specific set of flags can be passed into all adaptors. And then deal with it.

I'd like to at least have the idea of it not getting into state entertained, like let's imagine what that would be like (nothing more).

I bring that up, as I would like to see if we can avoid having every operation having an if statement for test mode..