ui_tests: extend test_pwpolicy.py suite
Extend WebUI test_pwpolicy suite with the following test cases
Details in the ticket https://pagure.io/freeipa/issue/7574
Added tests:
krbpwdminlength: lower range integer
krbmaxpwdlife: non-integer, abc
krbmaxpwdlife: upper range integer,2147483648
krbmaxpwdlife: lower range integer,-1
krbminpwdlife: non-integer,edf
krbminpwdlife: upper range integer,2147483648
krbminpwdlife: lower range integer,-1
krbpwdhistorylength: non-integer,HIJ
krbpwdhistorylength: upper range integer,2147483648
krbpwdhistorylength: lower range integer,-1
krbpwdmindiffchars: noon-integer,3lm
krbpwdmindiffchars: upper range integer,2147483648
krbpwdmindiffchars: lower range integer, -1
krbpwdminlength: non-integer, n0p
krbpwdminlength: upper range integer,2147483648
krbpwdminlength: lower range integer, -1
cospriority: non-integer, abc
cospriority: upper range integer,2147483648
cospriority: lower range integer,-1
krbpwdmaxfailure: non-integer
krbpwdmaxfailure: upper range integer
krbpwdmaxfailure: lower range integer
krbpwdfailurecountinterval: non-integer
krbpwdfailurecountinterval: upper range integer
krbpwdfailurecountinterval: lower range integer
krbpwdlockoutduration: non-integer
krbpwdlockoutduration: upper range integer
krbpwdlockoutduration: lower range integer
deletePolicy_with various scenario
MeasurementUnitAdded_Bug798363
Delete global password policy
add_Policy_adder_dialog_bug910463
delete_Policy_deleter_dialog_bug910463
test field: cospriority
modifyPolicy(undo/refresh/reset)
empty policy name
upper bound of data range
lower bound of data range
non integer for policy priority
Signed-off-by: Varun Mylaraiah <mvarun@redhat.com>
Reviewed-By: Pavel Picka <ppicka@redhat.com>
2018-05-30 12:50:09 -05:00
|
|
|
#
|
|
|
|
# Copyright (C) 2018 FreeIPA Contributors see COPYING for license
|
|
|
|
#
|
|
|
|
|
|
|
|
import ipatests.test_webui.data_group as group
|
|
|
|
|
|
|
|
ENTITY = 'pwpolicy'
|
|
|
|
DEFAULT_POLICY = 'global_policy'
|
|
|
|
|
|
|
|
DATA = {
|
|
|
|
'pkey': 'admins',
|
|
|
|
'add': [
|
|
|
|
('combobox', 'cn', 'admins'),
|
|
|
|
('textbox', 'cospriority', '364'),
|
|
|
|
],
|
|
|
|
'mod': [
|
|
|
|
('textbox', 'krbmaxpwdlife', '3000'),
|
|
|
|
('textbox', 'krbminpwdlife', '1'),
|
|
|
|
('textbox', 'krbpwdhistorylength', '0'),
|
|
|
|
('textbox', 'krbpwdmindiffchars', '2'),
|
|
|
|
('textbox', 'krbpwdminlength', '2'),
|
|
|
|
('textbox', 'krbpwdmaxfailure', '15'),
|
|
|
|
('textbox', 'krbpwdfailurecountinterval', '5'),
|
|
|
|
('textbox', 'krbpwdlockoutduration', '3600'),
|
|
|
|
('textbox', 'cospriority', '365'),
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
PKEY1 = group.PKEY
|
|
|
|
DATA1 = {
|
|
|
|
'pkey': group.PKEY,
|
|
|
|
'add': [
|
|
|
|
('combobox', 'cn', group.PKEY),
|
|
|
|
('textbox', 'cospriority', '1'),
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
PKEY2 = group.PKEY2
|
|
|
|
DATA2 = {
|
|
|
|
'pkey': group.PKEY2,
|
|
|
|
'add': [
|
|
|
|
('combobox', 'cn', group.PKEY2),
|
|
|
|
('textbox', 'cospriority', '2'),
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
PKEY3 = group.PKEY3
|
|
|
|
DATA3 = {
|
|
|
|
'pkey': group.PKEY3,
|
|
|
|
'add': [
|
|
|
|
('combobox', 'cn', group.PKEY3),
|
|
|
|
('textbox', 'cospriority', '3'),
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
PKEY6 = group.PKEY6
|
|
|
|
DATA_RESET = {
|
|
|
|
'pkey': group.PKEY6,
|
|
|
|
'add': [
|
|
|
|
('combobox', 'cn', group.PKEY6),
|
|
|
|
('textbox', 'cospriority', '6'),
|
|
|
|
],
|
|
|
|
'mod': [
|
|
|
|
('textbox', 'krbmaxpwdlife', '1000'),
|
|
|
|
('textbox', 'krbminpwdlife', '2'),
|
|
|
|
('textbox', 'krbpwdhistorylength', '0'),
|
|
|
|
('textbox', 'krbpwdmindiffchars', '3'),
|
|
|
|
('textbox', 'krbpwdminlength', '4'),
|
|
|
|
('textbox', 'krbpwdmaxfailure', '17'),
|
|
|
|
('textbox', 'krbpwdfailurecountinterval', '4'),
|
|
|
|
('textbox', 'krbpwdlockoutduration', '4200'),
|
|
|
|
('textbox', 'cospriority', '38'),
|
2022-09-07 04:20:37 -05:00
|
|
|
('textbox', 'passwordgracelimit', '42'),
|
ui_tests: extend test_pwpolicy.py suite
Extend WebUI test_pwpolicy suite with the following test cases
Details in the ticket https://pagure.io/freeipa/issue/7574
Added tests:
krbpwdminlength: lower range integer
krbmaxpwdlife: non-integer, abc
krbmaxpwdlife: upper range integer,2147483648
krbmaxpwdlife: lower range integer,-1
krbminpwdlife: non-integer,edf
krbminpwdlife: upper range integer,2147483648
krbminpwdlife: lower range integer,-1
krbpwdhistorylength: non-integer,HIJ
krbpwdhistorylength: upper range integer,2147483648
krbpwdhistorylength: lower range integer,-1
krbpwdmindiffchars: noon-integer,3lm
krbpwdmindiffchars: upper range integer,2147483648
krbpwdmindiffchars: lower range integer, -1
krbpwdminlength: non-integer, n0p
krbpwdminlength: upper range integer,2147483648
krbpwdminlength: lower range integer, -1
cospriority: non-integer, abc
cospriority: upper range integer,2147483648
cospriority: lower range integer,-1
krbpwdmaxfailure: non-integer
krbpwdmaxfailure: upper range integer
krbpwdmaxfailure: lower range integer
krbpwdfailurecountinterval: non-integer
krbpwdfailurecountinterval: upper range integer
krbpwdfailurecountinterval: lower range integer
krbpwdlockoutduration: non-integer
krbpwdlockoutduration: upper range integer
krbpwdlockoutduration: lower range integer
deletePolicy_with various scenario
MeasurementUnitAdded_Bug798363
Delete global password policy
add_Policy_adder_dialog_bug910463
delete_Policy_deleter_dialog_bug910463
test field: cospriority
modifyPolicy(undo/refresh/reset)
empty policy name
upper bound of data range
lower bound of data range
non integer for policy priority
Signed-off-by: Varun Mylaraiah <mvarun@redhat.com>
Reviewed-By: Pavel Picka <ppicka@redhat.com>
2018-05-30 12:50:09 -05:00
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
PKEY_SPECIAL_CHAR = group.PKEY_SPECIAL_CHAR_GROUP
|
|
|
|
DATA_SPECIAL_CHAR = {
|
|
|
|
'pkey': group.PKEY_SPECIAL_CHAR_GROUP,
|
|
|
|
'add': [
|
|
|
|
('combobox', 'cn', group.PKEY_SPECIAL_CHAR_GROUP),
|
|
|
|
('textbox', 'cospriority', '7'),
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
PKEY7 = group.PKEY4
|
|
|
|
DATA7 = {
|
|
|
|
'pkey': group.PKEY4,
|
|
|
|
'add': [
|
|
|
|
('combobox', 'cn', group.PKEY4),
|
|
|
|
('textbox', 'cospriority', '4'),
|
|
|
|
],
|
|
|
|
}
|
2022-09-07 04:20:37 -05:00
|
|
|
|
|
|
|
PKEY8 = group.PKEY
|
|
|
|
DATA8 = {
|
|
|
|
'pkey': PKEY8,
|
|
|
|
'add': [
|
|
|
|
('combobox', 'cn', PKEY8),
|
|
|
|
('textbox', 'cospriority', '364'),
|
|
|
|
],
|
|
|
|
'mod': [
|
|
|
|
('textbox', 'krbmaxpwdlife', '3000'),
|
|
|
|
('textbox', 'krbminpwdlife', '1'),
|
|
|
|
('textbox', 'krbpwdhistorylength', '0'),
|
|
|
|
('textbox', 'krbpwdmindiffchars', '2'),
|
|
|
|
('textbox', 'krbpwdminlength', '2'),
|
|
|
|
('textbox', 'krbpwdmaxfailure', '15'),
|
|
|
|
('textbox', 'krbpwdfailurecountinterval', '5'),
|
|
|
|
('textbox', 'krbpwdlockoutduration', '3600'),
|
|
|
|
('textbox', 'cospriority', '364'),
|
|
|
|
('textbox', 'passwordgracelimit', '42'),
|
|
|
|
],
|
|
|
|
}
|