Giter VIP home page Giter VIP logo

docker-cache-acceptance-tests's Introduction

Docker Cache Acceptance Tests (DCATs)

This test suite exercises the Docker Cache when deployed alongside CF Runtime and Diego .

Usage

Getting the tests

To get these tests, you can either git clone this repo:

git clone https://github.com/cloudfoundry-incubator/docker-cache-acceptance-tests $GOPATH/src/github.com/cloudfoundry-incubator
cd $GOPATH/src/github.com/cloudfoundry-incubator
go get -t -v ./...

or go get it:

go get -t -v github.com/cloudfoundry-incubator/docker-cache-acceptance-tests/...

Either way, we assume you have Golang setup on your workstation.

Test setup

To run the Diego Acceptance tests, you will need:

  • a running CF deployment
  • a running Diego deployment
  • a running Docker Cache deployment
  • credentials for an Admin user
  • an environment variable CONFIG which points to a .json file that contains the application domain
  • the cf CLI
  • ginkgo testing framework
  • Docker executable

Configuration

The following commands will setup the CONFIG for a bosh-lite installation. Replace credentials, URLs and the path to Docker as appropriate for your environment.

cd $GOPATH/src/github.com/cloudfoundry-incubator/docker-cache-acceptance-tests
cat > integration_config.json <<EOF
{
  "api": "api.bosh-lite.com",
  "admin_user": "admin",
  "admin_password": "admin",
  "apps_domain": "bosh-lite.com",
  "docker_registry_address": "10.244.2.6:8080",
  "docker_executable": "docker",
  "docker_private_image": "private-docker-app",
  "docker_user": "user",
  "docker_password": "password",
  "docker_email": "[email protected]",
  "skip_ssl_validation": true
}
EOF
export CONFIG=$PWD/integration_config.json

Note: The tests require that you have a copy of the public docker image cloudfoundry/diego-docker-app:latest, stored in a private repo in Docker Hub. Therefore you need to provide the Docker credentials (user, password and email) for access to the image in the config above.

Install ginkgo:

Install the testing framework with:

go install github.com/onsi/ginkgo/ginkgo

Setup docker (OSX)

The tests use Docker to check the Cache functionality. Install Docker

In case you use boot2docker you will need to allow access to the insecure registry by adding your registry address to /var/lib/boot2docker/profile. For example:

EXTRA_ARGS='--insecure-registry 10.244.2.6:8080'

If you use docker-machine, you should configure a machine to accept the diego cache registry as insecure.

docker-machine create -d virtualbox --engine-insecure-registry=10.244.2.6:8080 default
eval "$(docker-machine env default)"

Enable Docker Feature Flag

In order to run the docker tests you need to enable Docker support in Diego as follows:

cf enable-feature-flag diego_docker

After the tests complete you may disable Docker support with:

cf diable-feature-flag diego_docker

Running the tests

After correctly setting the CONFIG environment variable, the following command will run the tests:

./bin/test

Running as BOSH errand

To deploy the tests as BOSH errand you have to:

  1. Copy the public docker image cloudfoundry/diego-docker-app:latest, in your private repo in Docker Hub.
  2. Add the Docker credentials (user, password and email) for access to the image in $GOPATH/src/github.com/cloudfoundry-incubator/docker-cache-acceptance-tests/templates/bosh-lite.yml
  3. Deploy the test errand
cd $GOPATH

bosh deployment $GOPATH/src/github.com/cloudfoundry-incubator/docker-cache-acceptance-tests/templates/bosh-lite.yml
bosh -n deploy

To start the tests:

bosh run errand docker_acceptance_tests

docker-cache-acceptance-tests's People

Contributors

andrew-edgar avatar emalm avatar georgethebeatle avatar hsiliev avatar jfmyers9 avatar luan avatar sykesm avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.