add more unit tests

parent b1d9c2bf
Pipeline #34905 passed with stage
in 2 minutes and 54 seconds
......@@ -10,31 +10,67 @@ test:role:apt:
script:
- echo "deb cdrom:[foobar test]/ stretch main" >> /etc/apt/sources.list
- touch /etc/apt/apt.conf.d/30apt-proxy
- ansible-playbook tests/apt.yml --skip-tags="no_unit_test"
- ansible-playbook tests/apt.yml
- apt-get update && apt-get -y install rolldice
test:role:bash:
script:
- ansible-playbook tests/bash.yml --skip-tags="no_unit_test"
- ansible-playbook tests/bash.yml
- bash -c "compgen -c unam |grep -q uname && exit || exit 1"
test:role:motd:
script:
- ansible-playbook tests/motd.yml --skip-tags="no_unit_test"
- ansible-playbook tests/motd.yml
- sh tests/motd/unit_test.sh
test:role:opsis:
script:
- ansible-playbook --inventory inventory/hosts -l opsis1 tests/opsis.yml --skip-tags="no_unit_test"
- echo "deb http://deb.debian.org/debian/ stretch-backports main" >> /etc/apt/sources.list
- apt-get update
- ansible-playbook tests/opsis.yml -e '{ "skip_unit_test":true }'
test:role:streaming-backend:
script:
- echo "deb http://deb.debian.org/debian/ stretch-backports main" >> /etc/apt/sources.list
- apt-get update
- ansible-playbook tests/streaming-backend.yml -e '{ "skip_unit_test":true }'
test:role:streaming-frontend:
script:
- echo "deb http://deb.debian.org/debian/ stretch-backports main" >> /etc/apt/sources.list
- apt-get update
- ansible-playbook tests/streaming-frontend.yml -e '{ "skip_unit_test":true }'
test:role:system-software:
script:
- ansible-playbook tests/system-software.yml --skip-tags="no_unit_test"
- ansible-playbook tests/system-software.yml -e '{ "skip_unit_test":true }'
test:role:tftp-server:
script:
- apt-get update
- ansible-playbook tests/tftp-server.yml -e '{ "skip_unit_test":true }'
test:role:tls-certificates:
script:
- apt-get update
- ansible-playbook tests/tls-certificates.yml -e '{ "skip_unit_test":true }'
test:role:users:
script:
- apt-get update && apt-get -y install locales
- ansible-playbook tests/users.yml --skip-tags="no_unit_test"
- ansible-playbook tests/users.yml -e '{ "skip_unit_test":true }'
test:role:vim:
script:
- apt-get update
- ansible-playbook tests/vim.yml
test:role:voctomix:
script:
- echo "deb http://deb.debian.org/debian/ stretch-backports main" >> /etc/apt/sources.list
- apt-get update && apt-get -y install systemd
- adduser videoteam
- ansible-playbook tests/voctomix.yml -e '{ "skip_unit_test":true }'
pages:
image: debian:sid
......
......@@ -19,5 +19,4 @@
systemd:
name: videoteam-ingest.path
enabled: yes
tags:
- no_unit_test
when: not skip_unit_test
......@@ -50,9 +50,7 @@
service:
name: hdmi2usbd
enabled: yes
when: "'hdmi2usbd' in serial_terminal"
tags:
- no_unit_test
when: not skip_unit_test and "'hdmi2usbd' in serial_terminal"
- name: push systemd hdmi2usbd.path
copy:
......@@ -64,6 +62,4 @@
service:
name: hdmi2usbd.path
enabled: yes
when: "'hdmi2usbd' in serial_terminal"
tags:
- no_unit_test
when: not skip_unit_test and "'hdmi2usbd' in serial_terminal"
......@@ -10,3 +10,33 @@ streaming:
- rex
- bo
dump: True
rtmp_publishers:
- 0.0.0.0/0
hq_config:
hls_bandwidth: 2176000
video_bitrate: 2000 # kbps
audio_bitrate: 128000 # bps
keyframe_period: 60 # seconds
adaptive:
video_codec: libx264
audio_codec: aac
variants:
high:
hls_bandwidth: 1152000
video_bitrate: 1024k
audio_bitrate: 128k
extra_settings: -tune zerolatency -preset veryfast -crf 23
width: 900
mid:
hls_bandwidth: 448000
video_bitrate: 768k
audio_bitrate: 96k
extra_settings: -tune zerolatency -preset veryfast -crf 23
width: 720
low:
hls_bandwidth: 288000
video_bitrate: 256k
audio_bitrate: 48k
extra_settings: -tune zerolatency -preset veryfast -crf 23
width: 480
mix_channels: false
......@@ -8,8 +8,10 @@
service:
name: nginx
state: reloaded
when: not skip_unit_test
- name: restart nginx
service:
name: nginx
state: restarted
when: not skip_unit_test
......@@ -95,6 +95,7 @@
subject_alt_names: []
self_sign: False
letsencrypt_do_nginx_vhost: not nginx_vhost.stat.exists
when: not skip_unit_test
tags:
- streaming
......
......@@ -14,4 +14,4 @@ Main variables are:
* `streaming.frontend.data_root`: nginx data_root.
* `streaming.frontdend.server_name`: The FQDN of your frontend streaming server.
* `streaming.frontdend.server_names`: The FQDN of your frontend streaming servers.
---
debian_version: stretch
conference_name: Example Conference
room_name: changeme
streaming:
frontend:
data_root: /srv/streaming-frontend
server_name: video.debconf.org
server_names:
- local.live.debconf.org
- af.live.debconf.org
- an.live.debconf.org
- as.live.debconf.org
- eu.live.debconf.org
- na.live.debconf.org
- oc.live.debconf.org
- sa.live.debconf.org
local_hosts:
- 10.0.0.0/8
backend:
server_name: backend.live.debconf.org
data_root: /srv/streaming
method: rtmp
rooms:
- minidebconf
rtmp:
vaapi: true
location: "rtmp://backend.live.debconf.org:1935/stream/{{ room_name }} live=1"
hq_config:
hls_bandwidth: 2176000
video_bitrate: 2000 # kbps
audio_bitrate: 128000 # bps
keyframe_period: 60 # seconds
adaptive:
video_codec: libx264
audio_codec: aac
variants:
high:
hls_bandwidth: 1152000
video_bitrate: 1024k
audio_bitrate: 128k
extra_settings: -tune zerolatency -preset veryfast -crf 23
width: 900
mid:
hls_bandwidth: 448000
video_bitrate: 768k
audio_bitrate: 96k
extra_settings: -tune zerolatency -preset veryfast -crf 23
width: 720
low:
hls_bandwidth: 288000
video_bitrate: 256k
audio_bitrate: 48k
extra_settings: -tune zerolatency -preset veryfast -crf 23
width: 480
dump: True
mix_channels: false
......@@ -3,8 +3,10 @@
service:
name: nginx
state: reloaded
when: not skip_unit_test
- name: restart nginx
service:
name: nginx
state: restarted
when: not skip_unit_test
......@@ -10,7 +10,7 @@
- name: install geoip from contrib
apt:
name: geoip-database-contrib
default_release: "{{ debian_version }}-backports"
when: not skip_unit_test # this package is deprecated and broken
tags:
- streaming
......@@ -59,6 +59,7 @@
subject_alt_names: "{{ streaming.frontend.server_names }}"
self_sign: False
letsencrypt_do_nginx_vhost: not nginx_vhost.stat.exists
when: not skip_unit_test
tags:
- streaming
......
......@@ -3,3 +3,4 @@
service:
name: systemd-journald
state: restarted
when: not skip_unit_test
......@@ -5,5 +5,4 @@
regexp: (^|#\s*)Storage=
line: Storage=persistent
notify: restart systemd-journald
tags:
- no_unit_test
when: not skip_unit_test
......@@ -6,7 +6,7 @@ apt_proxy: false
user_name: videoteam
# Defaults to not setting a password
#user_password_crypted: changeme
user_password_crypted: '*'
playbook_repo: https://salsa.debian.org/debconf-video-team/ansible
playbook_branch: master
......
......@@ -3,8 +3,10 @@
service:
name: dnsmasq
state: restarted
when: not skip_unit_test
- name: reload nginx
service:
name: nginx
state: reloaded
when: not skip_unit_test
......@@ -21,7 +21,7 @@
- name: sign certificate with letsencrypt
include_tasks: letsencrypt.yml
when: not self_sign
when: not self_sign and not skip_unit_test
tags:
- tls-certificates
......
......@@ -2,3 +2,4 @@
- name: reload-systemd
systemd:
daemon_reload: yes
when: not skip_unit_test
......@@ -16,3 +16,4 @@
owner: "{{ user_name }}"
group: "{{ user_name }}"
with_indexed_items: "{{ blackmagic_sources }}"
when: not skip_unit_test
......@@ -3,7 +3,7 @@
apt:
name: "{{ packages }}"
vars:
packages
packages:
- voctomix
- voctomix-outcasts
- gstreamer1.0-pulseaudio
......@@ -119,6 +119,7 @@
- voctocore
- loop
- bgloop
when: not skip_unit_test
- name: Autostart voctogui
file:
......
---
- hosts: 'localhost'
connection: 'local'
roles:
- { role: roles/streaming-backend }
---
- hosts: 'localhost'
connection: 'local'
roles:
- { role: roles/streaming-frontend }
---
- hosts: 'localhost'
connection: 'local'
roles:
- { role: roles/tftp-server }
---
- hosts: 'localhost'
connection: 'local'
roles:
- { role: roles/tls-certificates }
---
- hosts: 'localhost'
connection: 'local'
roles:
- { role: roles/vim }
---
- hosts: 'localhost'
connection: 'local'
roles:
- { role: roles/voctomix }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment