mirror of
https://github.com/linux-system-roles/network.git
synced 2026-07-22 02:36:11 +00:00
test: merge branch 'larskarlitski-test' (pr#18)
https://github.com/linux-system-roles/network/pull/18
This commit is contained in:
commit
f28b24ac05
4 changed files with 4 additions and 42 deletions
17
run-tests.sh
17
run-tests.sh
|
|
@ -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
|
||||
22
semaphore
22
semaphore
|
|
@ -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
|
||||
}
|
||||
|
||||
"$@"
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
---
|
||||
- hosts: all
|
||||
- name: Test executing the role with default parameters
|
||||
hosts: all
|
||||
roles:
|
||||
- network
|
||||
|
|
|
|||
|
|
@ -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/
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue