Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Beakerlib

The framework uses beakerlib for most tests and reporting. This framework is available in the base fedora repo.

Test Directory Structure

testing

bin

bootstrap_cloudrouter.sh

lib

remote-testing.sh

ssh.sh

kvm-install

runtest.sh

baseos

runtest.sh

bird

runtest.sh

opendaylight

runtest.sh

onos

runtest.sh

quagga

runtest.sh

run_kvm_smoketest.sh

Components

testing\bin\bootstrap_cloudrouter.sh

Use:  The script will create a libvirt cloudrouter guest on a local system.  The user running this script will need sudo access for libvirt.  The script will download and verify the image, create a cloud-init iso with a password and a sshkey, and create the libvirt guest. The guest will be assigned to the libvirt private network.

Usage: Can be run as a standalone script and is also called by kvm-install/runtest.sh

./bootstrap_cloudrouter.sh CloudRouter-Beta-Minimal-20150401.x86_64.raw.xz

options:

optional: -si | --skipcloudinit
optional: -sd | --skipdownload
optional: -ki | --keepbaseimage

Defaults that can be overwritten but passing the env var to the script.

CLOUDROUTER_USERPASS="CloudRouter"
CLOUDROUTER_URL="https://repo.cloudrouter.org/beta/images/"
CLOUDROUTER_NETWORK_IP="192.168.122.100"
CLOUDROUTER_NETWORK_NETMASK="255.255.255.0"
CLOUDROUTER_NETWORK_NETWORK="192.168.122.0"
CLOUDROUTER_NETWORK_BROADCAST="192.168.122.255"
CLOUDROUTER_NETWORK_DEFAULT_ROUTE="192.168.122.1"
CLOUDROUTER_NETWORK_DNS1="192.168.122.1"
CLOUDROUTER_NETWORK_DNS2="8.8.8.8"

 

testing\lib\remote-testing.sh

Use: this is a library for running remove ssh tests on a deployed guest using the generated sshkey from bootstrap_cloudrouter.sh

Used by:   run_kvm_smoketest.sh

testing\lib\ssh.sh

Use: this is a library used for ssh login testing.  Can test a user/password login or a user/sshkey login attempt.

Used by: kvm-install/runtest.sh test.

kvm-install/runtest.sh

Use: This beakerlib test calls bootstrap_cloudrouter.sh and checks that sshkeys were created. The guest is checked for a running state and is avalable on the network. remote ssh login tests are run against the guest.

Used by: run_kvm_smoketest.sh

baseos/runtest.sh

Use: This beakerlib test is pushed to the cloudrouter guest. This checks that the cloudrouter release and other base components are present.

Used by: run_kvm_smoketest.sh

bird/runtest.sh

Use: This beakerlib test is pushed to the cloudrouter guest. This checks the basic functionality of the BIRD package such as install/remove, start/stop, enabled/disabled. The birdc command is also check.

Used by: run_kvm_smoketest.sh

quagga/runtest.sh

Use: This beakerlib test is pushed to the cloudrouter guest. This checks the basic functionality of the QUAGGA package such as install/remove, start/stop, enabled/disabled.

Used by: run_kvm_smoketest.sh

opendaylight/runtest.sh

Use: This beakerlib test is pushed to the cloudrouter guest. This checks the basic functionality of the OpenDaylight package such as install/remove, start/stop, enabled/disabled.

Used by: run_kvm_smoketest.sh

onos/runtest.sh

Use: This beakerlib test is pushed to the cloudrouter guest. This checks the basic functionality of the ONOS package such as install/remove, start/stop, enabled/disabled.

Used by: run_kvm_smoketest.sh

run_kvm_smoketest.sh

Use: This is the main automation wrapper to run the full test suite. 

Usage: CLOUDROUTER_DISTROS="CloudRouter-Beta-Minimal-20150401.x86_64.raw.xz CloudRouter-Beta-Full-20150401.x86_64.raw.xz" run_kvm_smoketest.sh

Runs:

...

Automated tests are using the virt-test framework.  The additional config files for cloudrouter can be found in the cloudrouter github repo under testing.

Setup instructions can be found here.