forked from freeipa/freeipa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.test_runner_config.yaml
98 lines (96 loc) · 3.31 KB
/
.test_runner_config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#
# Copyright (C) 2017 FreeIPA Contributors see COPYING for license
#
# Configuration file for the test runner used in Travis CI
container:
detach: true
hostname: master.ipa.test
working_dir: /freeipa
host:
binds:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /dev/urandom:/dev/random:ro
privileged: true
security_opt:
- label:disable
tmpfs:
- /tmp
- /run
server:
domain: ipa.test
password: Secret123
realm: IPA.TEST
steps:
build:
- make V=0 ${make_target} LOG_COMPILE='gdb -return-child-result -ex run -ex "thread apply all bt" -ex "quit" --args'
builddep:
- rm -rf /var/cache/dnf/*
- echo "fastestmirror = True" >> /etc/dnf/dnf.conf
- echo "max_parallel_downloads = 8" >> /etc/dnf/dnf.conf
- echo "timeout = 8" >> /etc/dnf/dnf.conf
- echo "retries = 20" >> /etc/dnf/dnf.conf
- "dnf makecache || :"
- dnf makecache
- cat /var/cache/dnf/fastestmirror.cache
- dnf -y module enable nodejs:12
- dnf builddep -y ${builddep_opts} -D "with_wheels 1" --spec freeipa.spec.in --best --allowerasing --setopt=install_weak_deps=False
- dnf install -y gdb
- dnf update -y annobin
cleanup:
- chown -R ${uid}:${gid} ${container_working_dir}
- journalctl -b --no-pager > systemd_journal.log
- >
tar --ignore-failed-read -cvf ${container_working_dir}/var_log.tar
/var/log/dirsrv
/var/log/httpd
/var/log/ipa*
/var/log/krb5kdc.log
/var/log/pki
systemd_journal.log
`find daemons -name '*.log' -print`
- chown ${uid}:${gid} ${container_working_dir}/var_log.tar
- ls -laZ /etc/dirsrv/slapd-*/ /etc/httpd/alias/ /etc/pki/pki-tomcat/alias/ || true
configure:
- ./autogen.sh
install_packages:
- sed -i 's/%_install_langs \(.*\)/\0:fr/g' /etc/rpm/macros.image-language-conf
- dnf makecache
- dnf install -y ${container_working_dir}/dist/rpms/*.rpm --best --allowerasing
- dnf install -y firewalld
- systemctl --now enable firewalld
install_server:
- ipa-server-install -U --domain ${server_domain} --realm ${server_realm} -p ${server_password}
-a ${server_password} --setup-dns --setup-kra --auto-forwarders
- sed -ri "s/mode = production/mode = development/" /etc/ipa/default.conf
- systemctl restart httpd.service
- firewall-cmd --add-service={freeipa-ldap,freeipa-ldaps,dns}
lint:
- make V=0 lint
webui_unit:
- dnf install -y npm
- cd ${container_working_dir}/install/ui/js/libs && make
- cd ${container_working_dir}/install/ui && npm install
- cd ${container_working_dir}/install/ui && node_modules/grunt/bin/grunt --verbose test
tox:
# just run one pylint and one Python 3 target (time/coverage trade-off)
- tox -e py36,pypi,pylint3
prepare_tests:
- echo ${server_password} | kinit admin && ipa ping
- cp -r /etc/ipa/* ~/.ipa/
- echo ${server_password} > ~/.ipa/.dmpw
- echo 'wait_for_dns=5' >> ~/.ipa/default.conf
run_tests:
- ipa-test-config --help
- ipa-test-task --help
- ipa-run-tests ${tests_ignore} -k-test_dns_soa ${tests_verbose} ${path}
- '! grep -n -C5 BytesWarning /var/log/httpd/error_log'
- ipa-server-install --uninstall -U
# second uninstall to verify that --uninstall without installation works
- ipa-server-install --uninstall -U
- firewall-cmd --remove-service={freeipa-ldap,freeipa-ldaps,dns}
tests:
ignore:
- test_integration
- test_webui
- test_ipapython/test_keyring.py
verbose: true