https://github.com/commercetools/ctp-smoke-tests
Smoke tests for CTP platform (https://docs.commercetools.com)
https://github.com/commercetools/ctp-smoke-tests
audit-backend
Last synced: about 1 year ago
JSON representation
Smoke tests for CTP platform (https://docs.commercetools.com)
- Host: GitHub
- URL: https://github.com/commercetools/ctp-smoke-tests
- Owner: commercetools
- Created: 2019-09-16T12:02:01.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2025-03-24T16:16:50.000Z (over 1 year ago)
- Last Synced: 2025-04-20T15:17:57.257Z (about 1 year ago)
- Topics: audit-backend
- Language: Scala
- Homepage:
- Size: 466 KB
- Stars: 5
- Watchers: 51
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# ctp-smoke-tests
[](https://circleci.com/gh/commercetools/ctp-smoke-tests)
## How to run the smoke tests
The following environment variables have to be defined to run the tests:
```
$ AUTH_URL=
$ API_URL=
$ CLIENT_ID=
$ CLIENT_SECRET=
$ PROJECT_KEY=
```
Run the smoke tests as docker container:
```
$ docker run -it --rm -e AUTH_URL -e API_URL -e CLIENT_ID -e CLIENT_SECRET -e PROJECT_KEY gcr.io/ct-images/ctp-smoke-tests:main
```
## Docker set up (sbt-native-packager)
### Create a local docker image:
```
# sbt docker:publishLocal
```
### Publishing a docker image
We publish images to the [public CTP docker registry on google cloud](https://console.cloud.google.com/gcr/images/ct-images/GLOBAL/ctp-smoke-tests).
#### Automatic publishing
The CI pipeline automatically publishes a docker image for each PR and for `main`.
Docker images are tagged with the git commit and the git branch.
The CI pipeline uses:
- [this account](https://github.com/commercetools/ops-terraform/blob/master/ct-images/users-manager/service-accounts/ctp_smoke_tests.tf).
- [the project `ctp-smoke-tests`](https://monster.sso.europe-west1.gcp.commercetools.com/v1/#/projects/ctp-smoke-tests).
#### Manually publish an image
To manually publish an image, we need permissions to do so.
Those permissions are managed in [ops-terraform](https://github.com/commercetools/ops-terraform/blob/master/ct-images/container-registry/main.tf).
```
# set up permissions to push to the goole repository (has to be done only once)
$ gcloud auth configure-docker
$ sbt docker:publish
```
## External libraries
* [Cornichon](https://github.com/agourlay/cornichon)
* [Refined](https://github.com/fthomas/refined)
* [Pureconfig](https://github.com/pureconfig/pureconfig/)
* [SBT Native Packager](https://www.scala-sbt.org/sbt-native-packager/index.html)