sasjs / server

Build Apps on Base SAS
https://server.sasjs.io
MIT License
20 stars 3 forks source link

mocked api #128

Closed allanbowe closed 1 year ago

allanbowe commented 2 years ago

For development in non-SAS environments (eg running tests in github pipelines) it will be very helpful to have mocked versions of the Viya endpoints as they pertain to SASjs.

This will enable a more robust (and faster) test suite for the CLI and adapter, as well as various web apps. It will also mean that the tests can still be easily run against an actual viya instance on an ad-hoc basis.

The following entry will be enabled in the .env file:

# optional - enable mocked server endpoints for testing
# options: [disable|enable] default: `disable`
MOCK=

When enabled, various Viya / SAS 9 endpoints will be made available on SASjs server. The endpoints will provide a mix of actual and hard-coded responses, and varying degrees of actual / mocked functionality, in order to fit the needs of the test cases we have so far.

Definition of done: