Testing the Stock Trader microservices
Now that we've learned how to build our microservices, the next important step, before deploying them to an OpenShift environment, is to first perform some unit tests on them to make sure they are working as desired.
Testing the frontend microservice
We can perform such unit tests by using locally installed Docker on our laptops. Let's run the Docker container we just built for Trader, and try it out:
jalcorn@Johns-MBP-8 portfolio % docker run -p 9443:9443 -e JWT_AUDIENCE=test -e JWT_ISSUER=test -e TEST_MODE=true trader:latest Launching defaultServer (Open Liberty 21.0.0.4/wlp-1.0.51.cl210420210407-0944) on Eclipse OpenJ9 VM, version 11.0.11+9 (en_US) [AUDIT] CWWKE0001I: The server defaultServer has been launched. <snip> [INFO] SRVE0169I: Loading Web Module: Trader UI. [INFO] SRVE0250I: Web Module Trader UI has been bound to default_host. [AUDIT] CWWKT0016I: Web application available (default_host): http://5708495d563b...