Page MenuHomeDevCentral

Don't run the application in test environment
ClosedPublic

Authored by dereckson on Jul 30 2017, 20:11.
Tags
None
Referenced Files
F3755874: D1006.diff
Mon, Nov 18, 18:29
Unknown Object (File)
Fri, Nov 15, 08:44
Unknown Object (File)
Fri, Nov 15, 04:48
Unknown Object (File)
Fri, Nov 15, 04:33
Unknown Object (File)
Fri, Nov 15, 04:33
Unknown Object (File)
Wed, Nov 13, 21:38
Unknown Object (File)
Tue, Nov 12, 13:33
Unknown Object (File)
Tue, Nov 12, 12:51
Subscribers
None

Details

Summary

Currently, the application was always initialized, and
only for the web server, a check the app wasn't imported
was done.

In an unit testing context, we don't always want to initialize
the application, for example it's not useful to test helper methods.

Yet, each time the app was imported, the check_config method was called,
and so software exited with error code 1 if environment wasn't correctly
configured, a requirement for the microservice, but not for the test suite.

Test Plan
  • Run the app, ensure server is spawned
  • Import the app in another Python source code, ensure nothing is executed

Diff Detail

Repository
rND Delivery API for Notifications center
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Mar 23 2018, 19:23
This revision was automatically updated to reflect the committed changes.