iSCSI: test user authentication

Summary:
This isn't in the criteria, but it's commonly used, so we ought
to test this way. Require authentication for the iSCSI target
and have the test provide the appropriate auth info.

Test Plan:
Run the iscsi test and check it works (you need the
recent fixes for support_server to make *that* work). Nothing
else should be affected.

Reviewers: jskladan, garretraziel

Reviewed By: garretraziel

Subscribers: tflink

Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D1070
This commit is contained in:
Adam Williamson 2016-12-20 08:34:30 -08:00
parent 0fa6138448
commit 7135a4e05d
7 changed files with 43 additions and 3 deletions

View File

@ -110,7 +110,9 @@ sub select_disks {
if (%iscsi) { if (%iscsi) {
assert_and_click "anaconda_install_destination_add_network_disk"; assert_and_click "anaconda_install_destination_add_network_disk";
foreach my $target (keys %iscsi) { foreach my $target (keys %iscsi) {
my $ip = $iscsi{$target}; my $ip = $iscsi{$target}->[0];
my $user = $iscsi{$target}->[1];
my $password = $iscsi{$target}->[2];
assert_and_click "anaconda_install_destination_add_iscsi_target"; assert_and_click "anaconda_install_destination_add_iscsi_target";
wait_still_screen 2; wait_still_screen 2;
type_safely $ip; type_safely $ip;
@ -118,6 +120,14 @@ sub select_disks {
type_safely $target; type_safely $target;
# start discovery - three tabs, enter # start discovery - three tabs, enter
type_safely "\t\t\t\n"; type_safely "\t\t\t\n";
if ($user && $password) {
assert_and_click "anaconda_install_destination_target_auth_type";
assert_and_click "anaconda_install_destination_target_auth_type_chap";
send_key "tab";
type_safely $user;
send_key "tab";
type_safely $password;
}
assert_and_click "anaconda_install_destination_target_login"; assert_and_click "anaconda_install_destination_target_login";
assert_and_click "anaconda_install_destination_select_target"; assert_and_click "anaconda_install_destination_select_target";
} }

View File

@ -0,0 +1,15 @@
{
"tags": [
"anaconda_install_destination_target_auth_type"
],
"properties": [],
"area": [
{
"xpos": 426,
"ypos": 313,
"width": 88,
"height": 17,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 425,
"ypos": 343,
"width": 83,
"height": 20,
"type": "match"
}
],
"properties": [],
"tags": [
"anaconda_install_destination_target_auth_type_chap"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

View File

@ -27,7 +27,7 @@ sub run {
## ISCSI ## ISCSI
# start up iscsi target # start up iscsi target
assert_script_run "printf '<target iqn.2016-06.local.domain:support.target1>\n backing-store /dev/vdb\n</target>' > /etc/tgt/conf.d/openqa.conf"; assert_script_run "printf '<target iqn.2016-06.local.domain:support.target1>\n backing-store /dev/vdb\n incominguser test weakpassword\n</target>' > /etc/tgt/conf.d/openqa.conf";
# open firewall port # open firewall port
assert_script_run "firewall-cmd --add-service=iscsi-target"; assert_script_run "firewall-cmd --add-service=iscsi-target";
assert_script_run "systemctl restart tgtd.service"; assert_script_run "systemctl restart tgtd.service";

View File

@ -6,7 +6,7 @@ sub run {
my $self = shift; my $self = shift;
# iscsi config hash # iscsi config hash
my %iscsi; my %iscsi;
$iscsi{'iqn.2016-06.local.domain:support.target1'} = '10.0.2.110'; $iscsi{'iqn.2016-06.local.domain:support.target1'} = ['10.0.2.110', 'test', 'weakpassword'];
# Anaconda hub # Anaconda hub
# Go to INSTALLATION DESTINATION and ensure one regular disk # Go to INSTALLATION DESTINATION and ensure one regular disk
# and the iscsi target are selected. # and the iscsi target are selected.