Set AUTH variable in natapp basic suite 11/66611/4
authorItzik Brown <itzikb@redhat.com>
Tue, 19 Dec 2017 10:42:19 +0000 (12:42 +0200)
committerJamo Luhrsen <jluhrsen@redhat.com>
Wed, 20 Dec 2017 22:12:25 +0000 (22:12 +0000)
Using ODL_RESTCONF_USER and ODL_RESTCONF_PASSWORD
to set the AUTH variable

Change-Id: Ibfda4f3ed38abfe360042c2ef5b3c29412b56974
Signed-off-by: Itzik Brown <itzikb@redhat.com>
csit/suites/natapp/basic/restconf_modules.robot
csit/variables/Variables.robot

index 88c9b221579e6c8e2636c045b72be591b0a1968f..acf67954f8721dee76e5c632c47498d4bd4679bd 100644 (file)
@@ -1,13 +1,14 @@
 *** Settings ***
 Documentation     Test suite to verify Restconf is OK.
-Suite Setup       RequestsLibrary.Create_Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
 Suite Teardown    RequestsLibrary.Delete_All_Sessions
 Library           RequestsLibrary
-Variables         ${CURDIR}/../../../variables/Variables.py
+Resource          ${CURDIR}/../../../variables/Variables.robot
 
 *** Test Cases ***
 Get Controller Modules
     [Documentation]    Get the restconf modules, check 200 status and ietf-restconf presence.
+    ${AUTH} =    Set Variable    ${ODL_RESTCONF_USER}    ${ODL_RESTCONF_PASSWORD}
+    RequestsLibrary.Create_Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=&{HEADERS_XML}
     ${resp} =    RequestsLibrary.Get_Request    session    ${MODULES_API}
     BuiltIn.Log    ${resp.content}
     BuiltIn.Should_Be_Equal    ${resp.status_code}    ${200}
index c693f3ded7f46655df046a8cfda1c7c7c1dfa8fb..1812f0cb457574861c8576f234c8638c051db48c 100644 (file)
@@ -27,7 +27,7 @@ Documentation     Resource consisting purely of variable definitions useful for
 ${ALERTFIELDCONTENTRULERECORD}    /restconf/config/alertrule:alertFieldContentRuleRecord/    # FIXME: Move to a separate Centinel-related Resource and add description.
 ${ALERTFIELDVALUERULERECORD}    /restconf/config/alertrule:alertFieldValueRuleRecord    # FIXME: Move to a separate Centinel-related Resource and add description.
 ${ALERTMESSAGECOUNTRULERECORD}    /restconf/config/alertrule:alertMessageCountRuleRecord/    # FIXME: Move to a separate Centinel-related Resource and add description.
-@{AUTH}           admin    admin    # Authentication tuple for accessing ODL RESTCONF server. TODO: Migrate most suites to TemplatedRequests, then chose a more descriptive name.
+@{AUTH}           ${ODL_RESTCONF_USER}    ${ODL_RESTCONF_PASSWORD}    # Authentication tuple for accessing ODL RESTCONF server. TODO: Migrate most suites to TemplatedRequests, then chose a more descriptive name.
 @{AUTH_SDN}       sdnadmin    sdnsdn    # Authentication tuple for accessing ODL RESTCONF server with Keystone Authentication
 @{AUTH_SDN_DOMAIN}    sdnadmin@sdn    sdnsdn    # Authentication tuple for accessing ODL RESTCONF server with Keystone Authentication
 @{AUTH_SDN_WRONG_DOM}    sdnadmin@wrong    sdnsdn    # Authentication tuple for accessing ODL RESTCONF server with Keystone Authentication