mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
webui:tests: move DNS test data to separate file
So that the data can be used in other test without running the DNS tests. Reviewed-By: Petr Cech <pcech@redhat.com>
This commit is contained in:
parent
9c2c3df0ab
commit
d7d13bc950
63
ipatests/test_webui/data_dns.py
Normal file
63
ipatests/test_webui/data_dns.py
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
#
|
||||||
|
# Copyright (C) 2018 FreeIPA Contributors see COPYING for license
|
||||||
|
#
|
||||||
|
|
||||||
|
ZONE_ENTITY = 'dnszone'
|
||||||
|
FORWARD_ZONE_ENTITY = 'dnsforwardzone'
|
||||||
|
RECORD_ENTITY = 'dnsrecord'
|
||||||
|
CONFIG_ENTITY = 'dnsconfig'
|
||||||
|
|
||||||
|
ZONE_DEFAULT_FACET = 'records'
|
||||||
|
|
||||||
|
ZONE_PKEY = 'foo.itest.'
|
||||||
|
|
||||||
|
ZONE_DATA = {
|
||||||
|
'pkey': ZONE_PKEY,
|
||||||
|
'add': [
|
||||||
|
('textbox', 'idnsname', ZONE_PKEY),
|
||||||
|
],
|
||||||
|
'mod': [
|
||||||
|
('checkbox', 'idnsallowsyncptr', 'checked'),
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
|
FORWARD_ZONE_PKEY = 'forward.itest.'
|
||||||
|
|
||||||
|
FORWARD_ZONE_DATA = {
|
||||||
|
'pkey': FORWARD_ZONE_PKEY,
|
||||||
|
'add': [
|
||||||
|
('textbox', 'idnsname', FORWARD_ZONE_PKEY),
|
||||||
|
('multivalued', 'idnsforwarders', [
|
||||||
|
('add', '192.168.2.1'),
|
||||||
|
]),
|
||||||
|
('radio', 'idnsforwardpolicy', 'only'),
|
||||||
|
],
|
||||||
|
'mod': [
|
||||||
|
('multivalued', 'idnsforwarders', [
|
||||||
|
('add', '192.168.3.1'),
|
||||||
|
]),
|
||||||
|
('checkbox', 'idnsforwardpolicy', 'first'),
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
|
RECORD_PKEY = 'itest'
|
||||||
|
A_IP = '192.168.1.10'
|
||||||
|
RECORD_ADD_DATA = {
|
||||||
|
'pkey': RECORD_PKEY,
|
||||||
|
'add': [
|
||||||
|
('textbox', 'idnsname', RECORD_PKEY),
|
||||||
|
('textbox', 'a_part_ip_address', A_IP),
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
RECORD_MOD_DATA = {
|
||||||
|
'fields': [
|
||||||
|
('textbox', 'a_part_ip_address', '192.168.1.11'),
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
CONFIG_MOD_DATA = {
|
||||||
|
'mod': [
|
||||||
|
('checkbox', 'idnsallowsyncptr', 'checked'),
|
||||||
|
],
|
||||||
|
}
|
@ -23,68 +23,14 @@ DNS tests
|
|||||||
|
|
||||||
from ipatests.test_webui.ui_driver import UI_driver
|
from ipatests.test_webui.ui_driver import UI_driver
|
||||||
from ipatests.test_webui.ui_driver import screenshot
|
from ipatests.test_webui.ui_driver import screenshot
|
||||||
|
from ipatests.test_webui.data_dns import (
|
||||||
|
ZONE_ENTITY, FORWARD_ZONE_ENTITY, CONFIG_ENTITY,
|
||||||
|
ZONE_DEFAULT_FACET, ZONE_PKEY, ZONE_DATA, FORWARD_ZONE_PKEY,
|
||||||
|
FORWARD_ZONE_DATA, RECORD_PKEY, A_IP, RECORD_ADD_DATA, RECORD_MOD_DATA,
|
||||||
|
CONFIG_MOD_DATA
|
||||||
|
)
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
ZONE_ENTITY = 'dnszone'
|
|
||||||
FORWARD_ZONE_ENTITY = 'dnsforwardzone'
|
|
||||||
RECORD_ENTITY = 'dnsrecord'
|
|
||||||
CONFIG_ENTITY = 'dnsconfig'
|
|
||||||
|
|
||||||
ZONE_DEFAULT_FACET = 'records'
|
|
||||||
|
|
||||||
ZONE_PKEY = 'foo.itest.'
|
|
||||||
|
|
||||||
ZONE_DATA = {
|
|
||||||
'pkey': ZONE_PKEY,
|
|
||||||
'add': [
|
|
||||||
('textbox', 'idnsname', ZONE_PKEY),
|
|
||||||
],
|
|
||||||
'mod': [
|
|
||||||
('checkbox', 'idnsallowsyncptr', 'checked'),
|
|
||||||
],
|
|
||||||
}
|
|
||||||
|
|
||||||
FORWARD_ZONE_PKEY = 'forward.itest.'
|
|
||||||
|
|
||||||
FORWARD_ZONE_DATA = {
|
|
||||||
'pkey': FORWARD_ZONE_PKEY,
|
|
||||||
'add': [
|
|
||||||
('textbox', 'idnsname', FORWARD_ZONE_PKEY),
|
|
||||||
('multivalued', 'idnsforwarders', [
|
|
||||||
('add', '192.168.2.1'),
|
|
||||||
]),
|
|
||||||
('radio', 'idnsforwardpolicy', 'only'),
|
|
||||||
],
|
|
||||||
'mod': [
|
|
||||||
('multivalued', 'idnsforwarders', [
|
|
||||||
('add', '192.168.3.1'),
|
|
||||||
]),
|
|
||||||
('checkbox', 'idnsforwardpolicy', 'first'),
|
|
||||||
],
|
|
||||||
}
|
|
||||||
|
|
||||||
RECORD_PKEY = 'itest'
|
|
||||||
A_IP = '192.168.1.10'
|
|
||||||
RECORD_ADD_DATA = {
|
|
||||||
'pkey': RECORD_PKEY,
|
|
||||||
'add': [
|
|
||||||
('textbox', 'idnsname', RECORD_PKEY),
|
|
||||||
('textbox', 'a_part_ip_address', A_IP),
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
RECORD_MOD_DATA = {
|
|
||||||
'fields': [
|
|
||||||
('textbox', 'a_part_ip_address', '192.168.1.11'),
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
CONFIG_MOD_DATA = {
|
|
||||||
'mod': [
|
|
||||||
('checkbox', 'idnsallowsyncptr', 'checked'),
|
|
||||||
],
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.tier1
|
@pytest.mark.tier1
|
||||||
class test_dns(UI_driver):
|
class test_dns(UI_driver):
|
||||||
|
Loading…
Reference in New Issue
Block a user