Now that AAA tests are running first, they are failing because
authorJamo Luhrsen <james.luhrsen@hp.com>
Tue, 16 Dec 2014 07:56:26 +0000 (23:56 -0800)
committerJamo Luhrsen <james.luhrsen@hp.com>
Tue, 16 Dec 2014 17:04:16 +0000 (09:04 -0800)
operational/nodes is not built yet.  Before, it was getting built
up by eariler run tests using mininet.  This will use a suite
setup __init__.txt inside the AAA folder to start mininet first.

Change-Id: Ic9915792845695fefc5f05252760c2b6266ec7f7
Signed-off-by: Jamo Luhrsen <james.luhrsen@hp.com>
test/csit/libraries/AAAKeywords.txt
test/csit/libraries/Utils.txt
test/csit/suites/aaa/AAA/__init__.txt [new file with mode: 0644]

index b8f1ff04bd82148ae59cb08d9828fbf3409d8b23..d44d5d18cd6c46a5f718194e23005de861c752e2 100644 (file)
@@ -6,6 +6,7 @@ Variables         ../variables/Variables.py
 ${WORKSPACE}      /opt/jenkins-integration/workspace/shared-controller
 ${BUNDLEFOLDER}    distribution-karaf-0.3.0-SNAPSHOT
 ${AUTHN_CFG_FILE}    ${WORKSPACE}/${BUNDLEFOLDER}/etc/org.opendaylight.aaa.authn.cfg
+${CONTROLLER_USER}  ${MININET_USER}
 
 *** Keywords ***
 AAA Login
@@ -32,17 +33,19 @@ Disable Authentication On Controller
     [Arguments]    ${controller_ip}
     [Documentation]    Will disable token based authentication. Currently, that is done with a config file change
     SSHLibrary.Open Connection    ${controller_ip}
-    Login With Public Key    ${MININET_USER}    ${USER_HOME}/.ssh/id_rsa    any
+    Login With Public Key    ${CONTROLLER_USER}    ${USER_HOME}/.ssh/id_rsa    any
     ${cmd}=    Set Variable    sed -i 's/^authEnabled=.*$/authEnabled=false/g' ${AUTHN_CFG_FILE}
     SSHLibrary.Execute Command    ${cmd}
+    SSHLibrary.Close Connection
 
 Enable Authentication On Controller
     [Arguments]    ${controller_ip}
     [Documentation]    Will enable token based authentication. Currently, that is done with a config file change
     SSHLibrary.Open Connection    ${controller_ip}
-    Login With Public Key    ${MININET_USER}    ${USER_HOME}/.ssh/id_rsa    any
+    Login With Public Key    ${CONTROLLER_USER}    ${USER_HOME}/.ssh/id_rsa    any
     ${cmd}=    Set Variable    sed -i 's/^authEnabled=.*$/authEnabled=true/g' ${AUTHN_CFG_FILE}
     SSHLibrary.Execute Command    ${cmd}
+    SSHLibrary.Close Connection
 
 Get Auth Token
     [Arguments]    ${user}=${USER}    ${password}=${PWD}    ${scope}=${SCOPE}    ${client_id}=${EMPTY}    ${client_secret}=${EMPTY}
index 6d711a2598277eb24f61b1d082d9bd77fd0c39b4..3610be8a0f859851d7a57584efacd80d04654155 100644 (file)
@@ -10,7 +10,8 @@ Start Suite
     [Documentation]    Basic setup/cleanup work that can be done safely before any system
     ...    is run.
     Log    Start the test on the base edition
-    Open Connection    ${MININET}    prompt=>    timeout=30s
+    ${mininet_conn_id}=     Open Connection    ${MININET}    prompt=>    timeout=30s
+    Set Suite Variable  ${mininet_conn_id}
     Login With Public Key    ${MININET_USER}    ${USER_HOME}/.ssh/id_rsa    any
     Write    sudo ovs-vsctl set-manager ptcp:6644
     Read Until    >
@@ -24,6 +25,7 @@ Stop Suite
     [Documentation]    Cleanup/Shutdown work that should be done at the completion of all
     ...    tests
     Log    Stop the test on the base edition
+    Switch Connection   ${mininet_conn_id}
     Read
     Write    exit
     Read Until    >
diff --git a/test/csit/suites/aaa/AAA/__init__.txt b/test/csit/suites/aaa/AAA/__init__.txt
new file mode 100644 (file)
index 0000000..f81f0b9
--- /dev/null
@@ -0,0 +1,9 @@
+*** Settings ***
+Documentation     Basic init work
+Suite Setup       Start Suite
+Suite Teardown    Stop Suite
+Resource          ../../../libraries/Utils.txt
+
+*** Variables ***
+
+*** Keywords ***