forked from theforeman/foreman-bats
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfb-install-katello.bats
executable file
·49 lines (38 loc) · 1.02 KB
/
fb-install-katello.bats
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
#!/usr/bin/env bats
# vim: ft=sh:sw=2:et
set -o pipefail
load os_helper
load foreman_helper
setup() {
KATELLO_VERSION=${KATELLO_VERSION:-nightly}
tSetOSVersion
}
@test "disable firewall" {
if tFileExists /usr/sbin/firewalld; then
tServiceStop firewalld; tServiceDisable firewalld
else
tServiceStop iptables; tServiceDisable iptables
fi
}
@test "install git and utilities" {
tPackageInstall git ruby curl screen
}
@test "clone katello-deploy repo" {
git clone https://github.com/Katello/katello-deploy.git
}
@test "run katello-deploy" {
cd katello-deploy/
./setup.rb --version $KATELLO_VERSION --installer-options "--foreman-admin-password ${KATELLO_ADMIN_PASSWORD:-admin}"
}
@test "wait 10 seconds" {
sleep 10
}
@test "check web app is up" {
curl -sk "https://localhost$URL_PREFIX/users/login" | grep -q login-form
}
@test "set idle timeout" {
echo 'Setting["idle_timeout"] = 9999' | foreman-rake console
}
@test "set entries per page" {
echo 'Setting["entries_per_page"] = 100' | foreman-rake console
}