-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathself_testing.yml
More file actions
100 lines (87 loc) · 3.25 KB
/
self_testing.yml
File metadata and controls
100 lines (87 loc) · 3.25 KB
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
99
100
# This file is part of agora-dev-box.
# Copyright (C) 2022 Sequent Tech Inc <legal@sequentech.io>
# agora-dev-box is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License.
# agora-dev-box is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
# You should have received a copy of the GNU Lesser General Public License
# along with agora-dev-box. If not, see <http://www.gnu.org/licenses/>.
---
- name: AgoraGui, Add Apt signing key for google-chrome
when: config.agora_gui.self_testing.enable
become: true
ansible.builtin.apt_key:
url: "https://dl.google.com/linux/linux_signing_key.pub"
state: present
- name: AgoraGui, Add google-chrome repository into sources list
when: config.agora_gui.self_testing.enable
become: true
ansible.builtin.apt_repository:
repo: deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
state: present
filename: google-chrome
- name: AgoraGui, Install google-chrome
when: config.agora_gui.self_testing.enable
become: true
ansible.builtin.apt:
name: google-chrome-stable
state: latest
update_cache: true
- name: AgoraGui, Creating selenium service runner
become: true
ansible.builtin.template:
src: agora-gui/templates/selenium.sh
dest: /home/agoragui/selenium.sh
owner: agoragui
group: agoragui
mode: '0744'
- name: AgoraGui, set e2e tests settings
become: true
become_user: agoragui
replace:
dest: /home/agoragui/agora-gui-admin/test/e2e.conf.js
regexp: '{{ item.regexp }}'
replace: '{{ item.replace }}'
with_items:
- regexp: 'defaultTimeoutInterval:.*'
replace: 'defaultTimeoutInterval: {{config.agora_gui.self_testing.defaultTimeoutInterval}},'
- regexp: 'getPageTimeout:.*'
replace: 'getPageTimeout: {{config.agora_gui.self_testing.getPageTimeout}},'
- regexp: 'allScriptsTimeout:.*'
replace: 'allScriptsTimeout: {{config.agora_gui.self_testing.allScriptsTimeout}},'
- name: AgoraGui, Creating selenium service
become: true
ansible.builtin.template:
src: agora-gui/templates/selenium.conf
dest: /etc/supervisor/conf.d/selenium.conf
owner: root
mode: '0600'
- name: AgoraGui, Creating launch_selftest.sh executable
become: true
ansible.builtin.template:
src: agora-gui/templates/launch_selftest.sh
dest: /home/agoragui/launch_selftest.sh
owner: agoragui
mode: '0700'
- name: AgoraGui, Creating kill_selftest.sh executable
become: true
ansible.builtin.template:
src: agora-gui/templates/kill_selftest.sh
dest: /home/agoragui/kill_selftest.sh
owner: agoragui
mode: '0700'
- name: AgoraGui, updating web-driver
when: config.agora_gui.self_testing.enable
become: true
become_user: agoragui
ansible.builtin.shell:
cmd: ./node_modules/webdriver-manager/bin/webdriver-manager update --ignore_ssl
chdir: /home/agoragui/agora-gui-admin/
- name: AgoraGui, restarting supervisor
become: true
ansible.builtin.service:
name: supervisor
state: restarted