catalog-history-service

To run locally

To run the catalog history service locally, you will need to have Go (version 1.17 or higher) installed on your machine.

Start the service

To start the service, follow these steps:

Run go get to install the required dependencies. Run go run main.go to start the service.

go get
go run main.go

To start the service with docker-compose:

Run docker-compose up -d --build to start the service and build the required images.

Testing

To run the tests for the service, use the following command:

go test ./test

To generate a test coverage report, use the following command:

go test -v -race -coverpkg=./... -coverprofile=coverage.txt -covermode=atomic ./test

Check that service is running

To check that the service is running, you can send a GET request to the /ping endpoint using curl:

curl -X 'GET' \
  'localhost:8080/ping' \
  -H 'accept: application/json'

Deployment

We use kustomize to deploy the service. All yaml files are located in the ./deploy folder.