Add support for recording regression tests

This commit is contained in:
Andrea Fazzi 2020-02-07 12:08:03 +01:00
parent 030bd81228
commit 0f0a16af9f
6 changed files with 80 additions and 1 deletions

29
config/config.yaml Normal file
View file

@ -0,0 +1,29 @@
url: "http://localhost:3000"
log_level: 2
language: "it"
keys:
cookie_store_key: "something-very-secret"
jwt_signing_key: "secret"
orm:
connection: "oef:oef@tcp(db:3306)/oef_test"
options: "charset=utf8&parseTime=True&loc=Local"
automigrate: true
regenerate: false
admin:
username: "admin"
password: "admin"
subscriber:
password: "subscribe"
smtp:
host: "localhost"
port: 1025
username: ""
password: ""
from: "no-reply@olimpiadi-economiaefinanza.it"
bcc: "bcc@fake.org"
subject: "[OEF2020] - Credenziali di accesso della scuola"

29
config/config_dev.yaml Normal file
View file

@ -0,0 +1,29 @@
url: "http://localhost:3000"
log_level: 2
language: "it"
keys:
cookie_store_key: "something-very-secret"
jwt_signing_key: "secret"
orm:
connection: "oef:oef@tcp(localhost:3307)/oef_dev"
options: "charset=utf8&parseTime=True&loc=Local"
automigrate: true
regenerate: false
admin:
username: "admin"
password: "admin"
subscriber:
password: "subscribe"
smtp:
host: "localhost"
port: 1025
username: ""
password: ""
from: "no-reply@olimpiadi-economiaefinanza.it"
bcc: "bcc@fake.org"
subject: "[OEF2020] - Credenziali di accesso della scuola"

View file

@ -1,4 +1,6 @@
FROM selenium/standalone-firefox-debug
USER root
RUN apt-get update && apt-get install -y ffmpeg gpac && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y ffmpeg gpac psmisc && rm -rf /var/lib/apt/lists/*
USER seluser

1
regression_test/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
recordings

10
regression_test/Makefile Normal file
View file

@ -0,0 +1,10 @@
.PHONY: all
.PHONY: test
test:
docker exec -d oef_regression_test_selenium_1 ffmpeg -y -video_size 1360x1020 -framerate 15 -f x11grab -i :99.0 /tmp/recording.mp4
go test
docker exec oef_regression_test_selenium_1 killall -s QUIT ffmpeg
docker cp oef_regression_test_selenium_1:/tmp/recording.mp4 recordings/recording.mp4
all: test

8
watch_log.bash Executable file
View file

@ -0,0 +1,8 @@
#!/bin/bash
until docker logs --tail 100 -f oef_regression_test
do
docker logs --tail 100 -f oef_regression_test
done
docker logs --tail 100 -f oef_regression_test