summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVarac <varac@leap.se>2017-06-23 19:35:52 +0200
committerVarac <varac@leap.se>2017-07-16 18:51:05 +0200
commita34d1b14a9a0874bfd6a0c84fa6ac64f2bc3f55a (patch)
treec7e1993f18c223e093c8a04b57f1964dd906b824
parentd3c88e6c1dfca8c5e5804a1b543d50b9f45c05a8 (diff)
Update tests/platform-ci/README.md how to run platform tests
-rw-r--r--tests/platform-ci/README.md48
1 files changed, 43 insertions, 5 deletions
diff --git a/tests/platform-ci/README.md b/tests/platform-ci/README.md
index 60c17e41..7a44a2fe 100644
--- a/tests/platform-ci/README.md
+++ b/tests/platform-ci/README.md
@@ -1,15 +1,53 @@
-Continuous integration tests for the leap_platform code.
+# Continuous integration tests for the leap_platform code
-Usage:
+# Setup
+ cd tests/platform-ci
./setup.sh
+
+# Run syntax checks and test if catalog compiles
+
bin/rake test:syntax
- bin/rake test:catalog
+ bin/rake catalog
For a list of all tasks:
bin/rake -T
-To create a virtual provider, run tests on it, then tear it down:
+# Full integration test
+
+You can create a virtual provider using AWS, run tests on it, then tear it down
+when the tests succeed.
+In order to do so, you need to set your AWS credentials as environment variables:
+
+ export AWS_ACCESS_KEY='...'
+ export AWS_SECRET_KEY='...'
+
+If you want to login to this machine during or after the deploy you need to
+
+ export SSH_PRIVATE_KEY=$(cat ~/.ssh/id_rsa)
+
+then start the deply test with
+
+ ./ci-build.sh
+
+# Running tests with docker and gitlab-runner
+
+Another possibility to run the platform tests is to use [gitlab-runner](https://docs.gitlab.com/runner/)
+together with [Docker](https://www.docker.com/).
+
+Export `AWS_ACCESS_KEY`, `AWS_SECRET_KEY` and `SSH_PRIVATE_KEY` as shown above.
+From the root dir of this repo run:
+
+ gitlab-runner exec docker --env AWS_ACCESS_KEY="$AWS_ACCESS_KEY" --env AWS_SECRET_KEY="$AWS_SECRET_KEY" --env SSH_PRIVATE_KEY="$SSH_PRIVATE_KEY" deploy_test
+
+See `.gitlab-ci.yml` for all the different test jobs.
+
+To ssh into the VM you first need to enter the docker container:
+
+ docker exec -u cirunner -it $(docker ps --latest -q) bash
+
+From there you can access the test provider config directory and ssh into the VM:
- ./ci-build.sh
+ cd /builds/project-0/tests/platform-ci/provider/
+ leap ssh citest0