Skip to content

Acceptance Tests

Ben Dalling edited this page Nov 19, 2016 · 3 revisions

Overview

Acceptance tests are only run when a release (either a normal release or a hotfix) is being prepared because:

  • The acceptance tests can be time consuming.
  • In the case of the ec2 hypervisor tests, the incur a cost in the form of AWS fees.

With the exception of the Debian 7 tests which run on Docker (with the docker hypervisor) all tests run on AWS using the ec2 hypervisor. The tests are triggered from [CircleCI] (https://circleci.com/gh/locp/cassandra).

Docker

While we currently test against Debian 7 with Docker, the rest are run using the EC2 hypervisor. Occasionally we may want to run against Docker on our local machine without incurring the extra cost of AWS. Therefore we would create a file for each node to test against called spec/acceptance/nodesets/default.yml with the following contents:

HOSTS:
  _NODENAME_:
    roles:
      - master
    platform: _PLATFORM_
    image: centos:6
    hypervisor: docker
    docker_cmd: _COMMAND_
    docker_image_commands:
      - _IMAGE_COMMANDS_
CONFIG:
  type: foss
  log_level: notice

For this to work, change the values for NODENAME, PLAFORM, COMMAND and IMAGE_COMMANDS with the relevant value from the table below:

Node Name Platform Image Command Image Commands
centos6 el-6-x86_64 centos:6 '["/sbin/init"]' 'yum -y install gcc tar'
centos7 el-7-x86_64 centos:7 '["/sbin/init"]' 'yum -y install gcc tar systemd-container initscripts'
debian8 debian-8-amd64 debian:8 '["/sbin/init"]' 'apt-get install -y locales-all net-tools sudo ufw wget'
ubuntu1204 ubuntu-1204-amd64 ubuntu:12.04 '["/sbin/init"]' 'apt-get install -y iptables sudo'
ubuntu1404 ubuntu-14.04-x64 ubuntu:14.04 N/A 'apt-get install -y iptables sudo'
ubuntu1604 ubuntu-16.04-x64 ubuntu:16.04 '["/sbin/init"]' 'apt-get install -y locales-all net-tools sudo ufw wget ntp python-pip python-minimal'

So for example, the node file to test against CentOS 6 would look something like this:

HOSTS:
  centos6:
    roles:
      - master
    platform: el-6-x86_64
    image: centos:6
    hypervisor: docker
    docker_cmd: '["/sbin/init"]'
    docker_image_commands:
      - 'yum -y install gcc tar'
CONFIG:
  type: foss
  log_level: notice

Useful Links

Clone this wiki locally