test: merge branch 'larskarlitski-test' (pr#18)

https://github.com/linux-system-roles/network/pull/18
This commit is contained in:
Thomas Haller 2017-10-03 14:02:09 +02:00
commit f28b24ac05
4 changed files with 4 additions and 42 deletions

View file

@ -1,17 +0,0 @@
#!/bin/bash
# Run integration test for this repository. It fetches the test harness from
# docker.io, which is built from
#
# http://github.com/linux-system-roles/test-harness
set -xeuf -o pipefail
CACHEDIR=${CACHEDIR:-$PWD/.image-cache}
mkdir -p $CACHEDIR
docker run --privileged \
--rm \
--volume $PWD:/role \
--volume $CACHEDIR:/cache \
cockpit/linux-system-roles-test

View file

@ -1,22 +0,0 @@
#!/bin/bash
# Run integration tests on semaphoreci.com.
set -xeuf -o pipefail
prepare() {
# install qemu because its post install script sets up /dev/kvm
sudo apt-get update
sudo apt-get install -q -y qemu-system-x86
sudo chmod a+rw /dev/kvm
}
run() {
docker-cache restore
CACHEDIR=$SEMAPHORE_CACHE_DIR ./run-tests.sh | tee
docker-cache snapshot
}
"$@"

View file

@ -1,4 +1,5 @@
---
- hosts: all
- name: Test executing the role with default parameters
hosts: all
roles:
- network

View file

@ -3,11 +3,11 @@
name: execute python unit tests
tasks:
- copy:
src: /role/library/network_connections.py
src: ../library/network_connections.py
dest: /tmp/test-unit-1/
- copy:
src: /role/library/test_network_connections.py
src: ../library/test_network_connections.py
dest: /tmp/test-unit-1/