blob: e4eeca2000f4f43851cddc1922351764ee8da03d (
plain)
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
|
# frozen_string_literal: true
module QA
module Runtime
module User
extend self
def admin
Struct.new(:username, :password).new(admin_username, admin_password)
end
def default_username
'root'
end
def default_email
'admin@example.com'
end
def default_password
Runtime::Env.initial_root_password || '5iveL!fe'
end
def username
Runtime::Env.user_username || default_username
end
def password
Runtime::Env.user_password || default_password
end
def email
default_email
end
def ldap_user?
Runtime::Env.ldap_username.present? && Runtime::Env.ldap_password.present?
end
def ldap_username
Runtime::Env.ldap_username || username
end
def ldap_password
Runtime::Env.ldap_password || password
end
def admin_username
Runtime::Env.admin_username || default_username
end
def admin_password
Runtime::Env.admin_password || default_password
end
end
end
end
QA::Runtime::User.extend_mod_with('Runtime::User', namespace: QA)
|