Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
platform
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
leap
platform
Commits
a34d1b14
There was a problem fetching the pipeline summary.
Verified
Commit
a34d1b14
authored
Jun 23, 2017
by
Varac
Browse files
Options
Downloads
Patches
Plain Diff
Update tests/platform-ci/README.md how to run platform tests
parent
d3c88e6c
Branches
Branches containing commit
No related tags found
1 merge request
!98
Run platform tests locally
Pipeline
#
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/platform-ci/README.md
+43
-5
43 additions, 5 deletions
tests/platform-ci/README.md
with
43 additions
and
5 deletions
tests/platform-ci/README.md
+
43
−
5
View file @
a34d1b14
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:
cd /builds/project-0/tests/platform-ci/provider/
leap ssh citest0
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment