To run the catalog history service locally, you will need to have Go (version 1.17 or higher) installed on your machine.
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.
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
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'
We use kustomize to deploy the service. All yaml files are located in the ./deploy folder.