Skip to main content

This is for internal use by the PaaS team. Public-facing documentation is located at docs.cloud.service.gov.uk.

Running tests on paas-cf locally

Note: This requires an intel chip, as the terraform tests download providers for x86 chips.

A number of packages need to be installed in order to run the tests of paas-cf locally. To run them, install the packages below then run

make test

Pre-requisites

paas-cf needs to be checked out in the correct location in your Go path: $GOPATH/src/github.com/alphagov/paas-cf

Install required packages

  brew install golang
  • Ruby 2.5.1

    • Installed via rbenv
    brew install rbenv
    

    then in ~/.bashrc somewhere, add eval “$(rbenv init -)”

  rbenv install 2.5.1
  • Shellcheck
  curl -L -o /usr/local/bin/shellcheck https://github.com/alphagov/paas-cf/releases/download/shellcheck_binary_0.4.6/shellcheck_darwin_amd64
  chmod +x /usr/local/bin/shellcheck
  • Terraform (0.11.1)
  wget https://releases.hashicorp.com/terraform/0.11.1/terraform_0.11.1_darwin_amd64.zip
  unzip -o terraform_0.11.1_darwin_amd64.zip -d /usr/local/bin
  rm terraform_0.11.1_darwin_amd64.zip
  • BOSH cli v2 (2.0.48)
  brew install cloudfoundry/tap/bosh-cli
  • Prometheus & Promtool
  brew install prometheus
  • CF CLI
  brew install cloudfoundry/tap/cf-cli`
  • YAML Lint
  brew install yamllint
  • Bundler
  gem install bundler
  • Gems via bundler

    cd path/to/paas-cf/
    bundle install
    
    • Ginkgo and gomega (prereq: golang)
  cd path/to/paas-cf/
  go get github.com/onsi/ginkgo/ginkgo
  go get github.com/onsi/gomega/...
  • jq
  brew install jq

Install optional packages

  • CloudFoundry cf-uaac
  gem install cf-uaac