Refactor system to support test mode #853
Labels
Component: Build
Related to the build system
Component: Core
Relates to core service
Component: Database
Relates to database microservice / data model
Component: Web UI
Relates to web appp user interface
The primary goal of a test mode is to permit unit testing within an isolated host. The main impact of this is that Globus authentication cannot be supported in this case due to requiring an Internet-accessible web service with a stable IP/domain name. For this reason, test mode will disable globus auth and instead use basic auth against DataFed's own user registry. It will also allow new user registration without Globus.
This change impacts the web service primarily, but specific changes may be needed in the DB microservice. For example, user access functions typically expect Globus UUIDs. It may be possible to "fake" certain aspects of this, but deeper analysis is required.
It is important that any affected source code does NOT use conditional execution based on the running mode. This is to prevent test code from being deployed to production. To achieve this, the build system must compile, package, and deploy slightly different sets of files (normal vs test). Affected code must be modularized to make this possible (i.e. separate directories containing normal vs test versions). Proper abstractions must be used to prevent complexity and maintenance issues (i.e. keep test code completely separate from non-test code, rather than co-mingled).
The text was updated successfully, but these errors were encountered: