From 96e4c3e8c4cdf58d8b4c8e174d05924a4b1803e8 Mon Sep 17 00:00:00 2001 From: Jamo Luhrsen Date: Fri, 8 Jan 2016 17:04:00 -0800 Subject: [PATCH] fixing some failing AAA test cases - error message had changed in response to invalid user, so updated that - remove the dependency on openflowplugin: - no more mininet involved - using /restconf/modules for REST transactions instead of operational nodes API - bug 4922 is documented with failure in the "Disable Authentication And Re-Enable Authentication" test case Change-Id: I901d52cff96b85c79d52837a29fbd38d640c7f56 Signed-off-by: Jamo Luhrsen --- .../authn/010_Credential_Authentication.robot | 25 +++++++------------ csit/suites/aaa/authn/__init__.robot | 9 ------- 2 files changed, 9 insertions(+), 25 deletions(-) delete mode 100644 csit/suites/aaa/authn/__init__.robot diff --git a/csit/suites/aaa/authn/010_Credential_Authentication.robot b/csit/suites/aaa/authn/010_Credential_Authentication.robot index 631125201b..a91d615396 100644 --- a/csit/suites/aaa/authn/010_Credential_Authentication.robot +++ b/csit/suites/aaa/authn/010_Credential_Authentication.robot @@ -1,7 +1,7 @@ *** Settings *** Documentation AAA System Tests -Suite Setup Credential Authentication Suite Setup -Suite Teardown Credential Authentication Suite Teardown +Suite Teardown Delete All Sessions +Test Setup Log Testcase Start To Controller Karaf Library Collections Library OperatingSystem Library String @@ -26,11 +26,11 @@ Fail To Get Token With Invalid Username And Password [Documentation] Negative test to verify invalid user/password is denied a token ${bad_user}= Set Variable notTheAdmin ${auth_data}= Create Auth Data ${bad_user} notTheAdminPassword - ${resp}= AAA Login ${CONTROLLER} ${auth_data} + ${resp}= AAA Login ${ODL_SYSTEM_IP} ${auth_data} Should Be Equal As Strings ${resp.status_code} 401 Log ${resp.content} ${error_msg}= Extract Value From Content ${resp.content} /error strip - Should Be Equal As Strings ${error_msg} User :${bad_user} does not exist + Should Contain ${error_msg} User :${bad_user} does not exist Create Token with Client Authorization [Documentation] Get a token using client domain @@ -53,12 +53,13 @@ Revoke Token And Verify Transaction Fails Disable Authentication And Re-Enable Authentication [Documentation] Toggles authentication off and verifies that no login credentials are needed for REST transactions - Disable Authentication On Controller ${CONTROLLER} + Disable Authentication On Controller ${ODL_SYSTEM_IP} Wait Until Keyword Succeeds 10s 1s Make REST Transaction 200 - Enable Authentication On Controller ${CONTROLLER} + Enable Authentication On Controller ${ODL_SYSTEM_IP} Wait Until Keyword Succeeds 10s 1s Validate That Authentication Fails With Wrong Token ${auth_token}= Get Auth Token Make REST Transaction 200 ${auth_token} + [Teardown] Report_Failure_Due_To_Bug 4922 *** Keywords *** Validate That Authentication Fails With Wrong Token @@ -67,17 +68,9 @@ Validate That Authentication Fails With Wrong Token Make REST Transaction [Arguments] ${expected_status_code} ${auth_data}=${EMPTY} - Create Session ODL_SESSION http://${CONTROLLER}:8181 + Create Session ODL_SESSION http://${ODL_SYSTEM_IP}:8181 ${headers}= Create Dictionary Content-Type=application/x-www-form-urlencoded Run Keyword If "${auth_data}" != "${EMPTY}" Set To Dictionary ${headers} Authorization Bearer ${auth_data} - ${resp}= RequestsLibrary.GET ODL_SESSION ${OPERATIONAL_NODES_API} headers=${headers} + ${resp}= RequestsLibrary.GET ODL_SESSION ${MODULES_API} headers=${headers} Log STATUS_CODE: ${resp.status_code} CONTENT: ${resp.content} Should Be Equal As Strings ${resp.status_code} ${expected_status_code} - Should Contain ${resp.content} nodes - -Credential Authentication Suite Setup - Log Suite Setup - -Credential Authentication Suite Teardown - Log Suite Teardown - Delete All Sessions diff --git a/csit/suites/aaa/authn/__init__.robot b/csit/suites/aaa/authn/__init__.robot deleted file mode 100644 index 78959ff62c..0000000000 --- a/csit/suites/aaa/authn/__init__.robot +++ /dev/null @@ -1,9 +0,0 @@ -*** Settings *** -Documentation Basic init work -Suite Setup Start Suite -Suite Teardown Stop Suite -Resource ../../../libraries/Utils.robot - -*** Variables *** - -*** Keywords *** -- 2.36.6