Front-end application written in Node.js that puts together all of the microservices under microservices-demo.
This application has been coded to behave specific ways based on various configurations and inputs to simulate real world issues application developers will face. The table below outlines these configurations
Situation | Configuration | Manifestation |
---|---|---|
Simulate login from Google or Facebook IdP | Provide request header "IdentityProvider" on login request. Google or Facebook. Omit header for default Buttercup Games IdP | Will emit an information log in front-end winston logs indicating the identity provider used during the authentication request. Will fail the authentication request and emit log if header is not Google, Facebook or Buttercup_Games |
Simulate login failures for Buttercup Game IdP | Touch file ./runtime_config/break_buttercup on front-end container. Remove file to restore operations | Will fail all authorization requests for Buttercup Games IdP and emit error log to front-end winston logs |
Simulate intermittent 500 failures to page requests | Modify file ./runtime_config/request_failure_percentage with single number on line one between 0 and 100 representing the percent probability that the request will fail. 100 will fail every request. Remove file to restore operations | Will result in http request from webserver returning a 500 error and emit error log to front-end winston logs |
Defect in code: Sport filter does not work as intended | Simply select and apply the sport filter on the catalog page | The code improperly ignores the filter and returns all socks to the end user |
Name | Version |
---|---|
Docker | >= 1.12 |
Docker Compose | >= 1.8.0 |
Make (optional) | >= 4.1 |
npm install
make test-image
make up
Make sure that the microservices are up & running
make test
To make sure that the test suite is running against the latest (local) version with your changes, you need to manually build the image, run the container and attach it to the proper Docker networks. There is a make task that will do all this for you:
make dev
That will also tail the logs of the container to make debugging easy. Then you can run the tests with:
make e2e
npm start
make server
curl http://localhost:8081
curl http://localhost:8080
GROUP=weaveworksdemos COMMIT=test ./scripts/push.sh