The aim of this project is to complete the case study. Here we made a shopping cart application. You can find more detailed information here. You can also find the notes I took while working here. The project receives input in two ways. As Rest and File. I will be explaining in more detail in the following config structure.
If you need it for testing postman collection here and commands collection here.
./config/default.go you can make the settings you want on this file. server.servertype: 'rest'
If you do, the application will receive rest requests. server.servertype: 'file'
the application will read from file and write to file. server.restserver.pprofenable: 0
if you change this setting to 1 you will open pprof. Apart from these, rest address,
file paths (I recommend you to be careful when changing them).
Logger config and MongoDB config are available.
After config settings;
docker-compose up -dif you want to see the application logs;
docker logs -f checkout-appthis command and the application will stand up. And you can send input according to your config settings.
Project Test information and run commands;
| * | Unit test | Integration test |
|---|---|---|
| Count | 197 | 10 |
| Coverage | %84.5 | %78.5 |
- Regenerate mock
go generate ./...- Unit test
go test ./...- Integration test
go test -tags=integration ./...