Skip to content

magiccrafter/engineering-metrics-data-collector

Repository files navigation

engineering-metrics-data-collector

Build Status codecov

Testing

The testing suite is mainly integration testing. It requires a local docker-engine to be running. Integration tests spin up a local postgres database and run the application against it. The 3rd party APIs are mocked using wiremock

cargo test runs all tests.

Starting a local postgres database

# start
docker run --name local-postgres -p 5432:5432 -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=postgres -d postgres

# stop & remove 
docker rm -f local-postgres

3rd party API authentication methods

The following Gitlab API authentication methods are supported:

curl --header "PRIVATE-TOKEN: XXX" "https://gitlab.com/api/v4/projects/{}"
curl --header "Authorization: Bearer XXX" "https://gitlab.com/api/v4/projects/{}"

The Atlassian's API authentication method is Basic Authentication:

# generate base64 string from user:api_token used for Basic Authentication header
echo -n [email protected]:api_token_string | base64

curl curl -D- \
   -X GET \
   -H "Authorization: Basic some_base64_string" \
   -H "Content-Type: application/json" \
   "https://your-domain.atlassian.net/rest/api/2/issue/ISSUE-Z"

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published