From 8cd28e5022188790c17832666b0a163515b7335e Mon Sep 17 00:00:00 2001 From: Jamo Luhrsen Date: Mon, 15 Dec 2014 23:56:26 -0800 Subject: [PATCH] Now that AAA tests are running first, they are failing because 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 --- test/csit/libraries/AAAKeywords.txt | 7 +++++-- test/csit/libraries/Utils.txt | 4 +++- test/csit/suites/aaa/AAA/__init__.txt | 9 +++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 test/csit/suites/aaa/AAA/__init__.txt diff --git a/test/csit/libraries/AAAKeywords.txt b/test/csit/libraries/AAAKeywords.txt index b8f1ff04bd..d44d5d18cd 100644 --- a/test/csit/libraries/AAAKeywords.txt +++ b/test/csit/libraries/AAAKeywords.txt @@ -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} diff --git a/test/csit/libraries/Utils.txt b/test/csit/libraries/Utils.txt index 6d711a2598..3610be8a0f 100644 --- a/test/csit/libraries/Utils.txt +++ b/test/csit/libraries/Utils.txt @@ -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 index 0000000000..f81f0b910d --- /dev/null +++ b/test/csit/suites/aaa/AAA/__init__.txt @@ -0,0 +1,9 @@ +*** Settings *** +Documentation Basic init work +Suite Setup Start Suite +Suite Teardown Stop Suite +Resource ../../../libraries/Utils.txt + +*** Variables *** + +*** Keywords *** -- 2.36.6