The YAML for the tenant services is defined in the following projects:
When a PR is made on one of the above YAML repos you can test in production in your tenant via the following:
-
http://openshift.io/ and login
-
go to your Profile page (click the top right drop down and select
Profile
) -
add
/_tenant
to your browsers address bar - so you will be looking at a URL like https://openshift.io/my-user-name/_tenant -
enter the
sha
of the latest commit in your PR as a templates repository blob -
click
Update Profile
-
now Update Tenant - you’re tenant should now be running the PR
To go back to using the default YAML:
-
go back to your tenant page like https://openshift.io/my-user-name/_tenant
-
click
Clear Values
-
click
Update Profile
-
now Update Tenant and you should be back to the default versions
Get the project:
$ git clone https://github.com/fabric8-services/fabric8-tenant $GOPATH/src/github.com/fabric8-services/fabric8-tenant
$ cd $GOPATH/src/github.com/fabric8-services/fabric8-tenant
Build the project:
$ make
Clean and generate objects (to have the latest version of the generated files in case of any changes since the last run):
$ make clean && make generate
Check any dependency changes:
$ make deps
Run tests (without code coverage):
$ make test-unit-no-coverage
You can do the same clean, generate and fetch the dependencies as it is suggested for unit tests:
$ make clean && make generate && make deps
Integration tests need to have a DB running. To use that we need to use a docker image for the build. For now just start it:
$ make docker-start
And start the DB:
$ make integration-test-env-prepare
Run all integration tests inside of the docker container (without code coverage):
$ make docker-test-migration && make docker-test-integration-no-coverage && make docker-test-remote-no-coverage
To stop containers:
$ make integration-test-env-tear-down
$ make docker-rm