Skeleton to create microservices using Chalice and Lambda.
This service is the main part of the follow architecture.
OpenApi example:
In this section contains the release notes of the project.
Version 1.0.0
- First version of the project;
All the changes must be tracked in CHANGELOG.md
- Python 3.6
- python-dotenv
- jsonformatter
- requests
- pytz
- redis
- pyyaml
- apispec
- marshmallow
- Flask
- Docker-compose
- OpenApi
To create the venv
and install the modules execute:
./bin/venv.sh
Execute the follow command:
./bin/flask/run-local.sh
To execute the build:
./bin/runenv.sh --build
Execute the follow command:
./bin/runenv.sh
Execute the follow command:
./bin/boot.sh
See the project samples in this folder here.
Some information about tests: See: https://martinfowler.com/articles/microservice-testing/#testing-progress-3
- Unit tests - Logic validation with mocks;
- Component tests - Validation with resources from docker images, using fixture resources to build the enviroment like: queues, nosql databases and relational databases;
- Integration tests - Validation of integration with staging enviroment (write and read operations only).
To run the unit tests of the project you can execute the follow command:
First you need install the tests requirements:
./bin/venv-exec.sh ./bin/tests/install-tests.sh
Execute the follow command:
./bin/venv-exec.sh ./bin/tests/unit-tests.sh
Booting the environment:
./bin/runenv.sh
Executing the tests:
./bin/venv-exec.sh ./bin/tests/component-tests.sh
Executing the tests:
./bin/venv-exec.sh ./bin/tests/integration-tests.sh
Executing the tests:
./bin/venv-exec.sh ./bin/tests/tests.sh
To execute coverage tests you can execute the follow commands:
Unit test coverage:
./bin/venv-exec.sh ./bin/tests/unit-coverage.sh
Component test coverage:
./bin/venv-exec.sh ./bin/tests/component-coverage.sh
Integration test coverage:
./bin/venv-exec.sh ./bin/tests/integration-coverage.sh
Observation:
The result can be found in the folder target/*
.
Unit test console: Unit test coverage report in HTML:
See the license LICENSE.md.
- Anderson de Oliveira Contreira andersoncontreira