summaryrefslogtreecommitdiffstats
path: root/sdc-os-chef/sdc-sanity
diff options
context:
space:
mode:
authorYuli Shlosberg <ys9693@att.com>2017-09-20 11:01:27 +0300
committerYuli Shlosberg <ys9693@att.com>2017-09-20 11:37:26 +0300
commit14ee2878d35c650c0a13f928a526a8f45f144eca (patch)
tree991a72863555619d02f0227996eb2bd7e0a631fc /sdc-os-chef/sdc-sanity
parentaf6975568834f357478fb22de95f2f79f4a4c085 (diff)
Build sanity docker execute automation
Change-Id: I7d275c7ec744ec9790c1147c2c28e48b16d2d92c Issue-Id: SDC-315 Signed-off-by: Yuli Shlosberg <ys9693@att.com>
Diffstat (limited to 'sdc-os-chef/sdc-sanity')
-rw-r--r--sdc-os-chef/sdc-sanity/Dockerfile7
-rw-r--r--sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/infra.zipbin0 -> 4155 bytes
-rw-r--r--sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/vbng.zipbin0 -> 3704 bytes
-rw-r--r--sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/vbrgemu.zipbin0 -> 3325 bytes
-rw-r--r--sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/vgmux.zipbin0 -> 3536 bytes
-rw-r--r--sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/vgw.zipbin0 -> 3469 bytes
-rw-r--r--sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/conf/attsdc-packages.yaml12
-rw-r--r--sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/conf/credentials.yaml48
-rw-r--r--sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/conf/log4j.properties34
-rw-r--r--sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/startTest.sh129
-rw-r--r--sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/SDC_Simulator_3_logback.rb10
-rw-r--r--sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/SDC_Simulator_4_locate_keystore.rb16
-rw-r--r--sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/SDC_Simulator_5_create_jetty_modules.rb14
-rw-r--r--sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/sanityTests_1_cleanup_jettydir.rb49
-rw-r--r--sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/sanityTests_2_setup_configuration.rb43
-rw-r--r--sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/sanityTests_3_sanity_execution.rb13
-rw-r--r--sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/templates/default/BE-titan.properties.erb1
-rw-r--r--sdc-os-chef/sdc-sanity/chef-solo/roles/sanityTests.json23
-rw-r--r--sdc-os-chef/sdc-sanity/chef-solo/solo.json4
-rw-r--r--sdc-os-chef/sdc-sanity/startup.sh18
20 files changed, 412 insertions, 9 deletions
diff --git a/sdc-os-chef/sdc-sanity/Dockerfile b/sdc-os-chef/sdc-sanity/Dockerfile
index ea137b401b..38bf26641e 100644
--- a/sdc-os-chef/sdc-sanity/Dockerfile
+++ b/sdc-os-chef/sdc-sanity/Dockerfile
@@ -4,6 +4,13 @@ COPY chef-solo /root/chef-solo/
COPY chef-repo/cookbooks/. /root/chef-solo/cookbooks/
+
+ENV TESTS_BASE /var/lib/tests
+RUN mkdir -p "$TESTS_BASE"
+WORKDIR $TESTS_BASE
+
+ADD test-apis-ci-*.jar ${TESTS_BASE}/
+
COPY startup.sh /root/
RUN chmod 770 /root/startup.sh
diff --git a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/infra.zip b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/infra.zip
new file mode 100644
index 0000000000..09eb9cd648
--- /dev/null
+++ b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/infra.zip
Binary files differ
diff --git a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/vbng.zip b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/vbng.zip
new file mode 100644
index 0000000000..ab5163d9ed
--- /dev/null
+++ b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/vbng.zip
Binary files differ
diff --git a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/vbrgemu.zip b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/vbrgemu.zip
new file mode 100644
index 0000000000..28c69a570f
--- /dev/null
+++ b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/vbrgemu.zip
Binary files differ
diff --git a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/vgmux.zip b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/vgmux.zip
new file mode 100644
index 0000000000..56de952150
--- /dev/null
+++ b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/vgmux.zip
Binary files differ
diff --git a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/vgw.zip b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/vgw.zip
new file mode 100644
index 0000000000..7a14718c2c
--- /dev/null
+++ b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/vgw.zip
Binary files differ
diff --git a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/conf/attsdc-packages.yaml b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/conf/attsdc-packages.yaml
new file mode 100644
index 0000000000..5d1a3e1537
--- /dev/null
+++ b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/conf/attsdc-packages.yaml
@@ -0,0 +1,12 @@
+packages:
+ - org.openecomp.sdc.ci.tests.execute.general
+ - org.openecomp.sdc.ci.tests.execute.user
+ - org.openecomp.sdc.ci.tests.execute.property
+ - org.openecomp.sdc.ci.tests.execute.lifecycle
+ - org.openecomp.sdc.ci.tests.execute.resource
+ - org.openecomp.sdc.ci.tests.execute.service
+ - org.openecomp.sdc.ci.tests.execute.artifacts
+ - org.openecomp.sdc.ci.tests.execute.imports
+ - org.openecomp.sdc.ci.tests.execute.category
+ - org.openecomp.sdc.ci.tests.execute.distribution
+ - org.openecomp.sdc.ci.tests.execute.product \ No newline at end of file
diff --git a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/conf/credentials.yaml b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/conf/credentials.yaml
new file mode 100644
index 0000000000..ab37f7bee8
--- /dev/null
+++ b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/conf/credentials.yaml
@@ -0,0 +1,48 @@
+ designer: {
+ username: cs0008,
+ password: 123123a,
+ firstname: ASDC,
+ lastname: KASPIN
+ }
+ admin: {
+ username: jh0003,
+ password: 123123a,
+ firstname: ASDC,
+ lastname: KASPIN
+ }
+ ops: {
+ username: af0006,
+ password: 123123a,
+ firstname: ASDC,
+ lastname: KASPIN
+ }
+ tester: {
+ username: kb0004,
+ password: 123123a,
+ firstname: ASDC,
+ lastname: KASPIN
+ }
+ governor: {
+ username: ah0002,
+ password: 123123a,
+ firstname: ASDC,
+ lastname: KASPIN
+ }
+ product_strategist: {
+ username: m99126,
+ password: 1910-FruitGum,
+ firstname: ASDC,
+ lastname: KASPIN
+ }
+ product_manager: {
+ username: m99127,
+ password: 747-Airplane,
+ firstname: ASDC,
+ lastname: KASPIN
+ }
+ product_local: {
+ username: pm0001,
+ password: 123123a,
+ firstname: ASDC,
+ lastname: KASPIN
+ } \ No newline at end of file
diff --git a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/conf/log4j.properties b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/conf/log4j.properties
new file mode 100644
index 0000000000..d313e92b55
--- /dev/null
+++ b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/conf/log4j.properties
@@ -0,0 +1,34 @@
+# Define the root logger with appender file
+log4j.rootLogger = INFO, FILE, stdout
+
+# Define the file appender
+log4j.appender.FILE=org.apache.log4j.RollingFileAppender
+log4j.appender.FILE.File=${targetlog}logs/ci-log.out
+
+# Define the layout for file appender
+log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
+log4j.appender.FILE.layout.conversionPattern=%d{yyyy-MM-dd HH:mm:ss} %5p [%10c] : %m%n
+
+# Set the maximum file size before rollover
+log4j.appender.FILE.maxFileSize=5MB
+
+# Set the the backup index
+log4j.appender.FILE.maxBackupIndex=10
+
+
+#############################################################
+
+# Direct log messages to stdout
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.Target=System.out
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+#log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
+log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %5p %10c:%L - %m%n
+
+log4j.logger.org.apache.cassandra.service.StorageProxy=INFO
+log4j.logger.com.thinkaurelius.titan.diskstorage.cassandra.CassandraTransaction=INFO, FILE, stdout
+
+log4j.logger.org.openecomp.sdc.ci.tests.utils=INFO, FILE, stdout
+log4j.additivity.org.openecomp.sdc.ci.tests.utils=false
+
+
diff --git a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/startTest.sh b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/startTest.sh
new file mode 100644
index 0000000000..933f9af6e4
--- /dev/null
+++ b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/startTest.sh
@@ -0,0 +1,129 @@
+#!/bin/bash
+REMOTE_DEBUG=false
+RERUN=false
+JAVA_OPTION=""
+debug_port=8000
+TEST_SUITES=testSuites
+fileName=testng-failed.xml
+
+function help_usage ()
+{
+ echo
+ echo "$0 (<jar_file_name> <suite file name>) [-r/rerun <true/false> -d/debug <true/false>]"
+ echo "nohup ./startTest.sh ui-ci-1707.0.5-SNAPSHOT-jar-with-dependencies.jar extendedSanity.xml -r false -d true &"
+ echo "by default rerun is true and remote debug is false."
+ echo
+ exit 2
+}
+
+function isBoolean ()
+{
+ PARAM_NAME=$1
+ VALUE=$2
+ if [[ ${VALUE} != "true" ]] && [[ ${VALUE} != "false" ]]; then
+ echo "Valid parameter" ${PARAM_NAME} "values are: true/false"
+ help_usage
+ fi
+}
+
+function prepareFailedXmlFile ()
+{
+ echo "1="$1 "2="$2 "fileName="${fileName}
+ PATTERN=`grep -w "test name=" ${FULL_PATH}/${TEST_SUITES}/$2 | awk -F'"' '{print $2}'`
+ sed '/<test name="'${PATTERN}'"/,/<!-- '${PATTERN}' --/d' $1 > ${FULL_PATH}/${TEST_SUITES}/${fileName}
+ sed -i 's/thread-count="[0-9]\+"/thread-count="1"/g' ${FULL_PATH}/${TEST_SUITES}/${fileName}
+}
+
+#main
+[ $# -lt 2 ] && help_usage
+
+JAR_FILE=$1
+SUITE_FILE=$2
+
+while [ $# -ne 0 ]; do
+ case $1 in
+ -r|rerun)
+ RERUN=$2
+ isBoolean $1 ${RERUN}
+ shift 1
+ shift 1
+ ;;
+ -d|debug)
+ REMOTE_DEBUG=$2
+ isBoolean $1 ${REMOTE_DEBUG}
+ shift 1
+ shift 1
+ ;;
+ *)
+ shift 1
+ ;;
+ esac
+done
+
+CURRENT_DIR=`pwd`
+BASEDIR=$(dirname $0)
+
+if [ ${BASEDIR:0:1} = "/" ]
+then
+ FULL_PATH=$BASEDIR
+else
+ FULL_PATH=$CURRENT_DIR/$BASEDIR
+fi
+LOGS_PROP_FILE=file:${FULL_PATH}/conf/log4j.properties
+#############################################
+TARGET_DIR=${FULL_PATH}/target
+CONF_FILE=${FULL_PATH}/conf/sdc.yaml
+
+DEBUG=true
+MainClass=org.openecomp.sdc.ci.tests.run.StartTest
+
+TESTS_DIR=/opt/app/sdc/ci/resources/tests
+COMPONENTS_DIR=/opt/app/sdc/ci/resources/components
+
+
+TARGET_LOG_DIR="${TARGET_DIR}/"
+
+######ADD USERS################
+
+BE_IP=`cat conf/attsdc.yaml | grep catalogBeHost| awk '{print $2}'`
+
+
+if [ ${REMOTE_DEBUG} == "true" ]; then
+ echo "Debug mode, Listen on port $debug_port";
+ JAVA_OPTION="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=${debug_port}" ;
+fi
+
+cmd="java $JAVA_OPTION -DdisplayException=true -Dtargetlog=${TARGET_LOG_DIR} -Dfilepath=${FILES_TEST} -Dconfig.resource=${CONF_FILE} -Ddebug=${DEBUG} -Dlog4j.configuration=${LOGS_PROP_FILE} -cp $JAR_FILE ${MainClass} $SUITE_FILE &"
+
+
+if [ $DEBUG == "true" ]
+then
+ $cmd
+else
+ $cmd >> /dev/null
+fi
+
+if [ ${RERUN} == "true" ]; then
+ if [ -f ${TARGET_DIR}/${fileName} ]; then
+ echo "Prepare" ${TARGET_DIR}/${fileName} "file to rerun all failed tests ...";
+ prepareFailedXmlFile ${TARGET_DIR}/${fileName} $SUITE_FILE;
+ SUITE_FILE=${fileName};
+ cmd="java $JAVA_OPTION -DdisplayException=true -Dtargetlog=${TARGET_LOG_DIR} -Dfilepath=${FILES_TEST} -Dconfig.resource=${CONF_FILE} -Ddebug=${DEBUG} -Dlog4j.configuration=${LOGS_PROP_FILE} -cp $JAR_FILE ${MainClass} $SUITE_FILE &"
+ $cmd;
+ fi
+fi
+
+status=`echo $?`
+
+source ExtentReport/versions.info
+now=$(date +'%Y-%m-%d_%H_%M')
+REPORT_NAME=${now}
+VERSION=${osVersion}
+
+
+
+echo "##################################################"
+echo "################# status is ${status} #################"
+echo "##################################################"
+
+exit $status \ No newline at end of file
diff --git a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/SDC_Simulator_3_logback.rb b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/SDC_Simulator_3_logback.rb
new file mode 100644
index 0000000000..0d9282b28a
--- /dev/null
+++ b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/SDC_Simulator_3_logback.rb
@@ -0,0 +1,10 @@
+jetty_base="/var/lib/jetty"
+
+
+cookbook_file "logback.xml" do
+ path "#{jetty_base}/config/sdc-simulator/logback.xml"
+ source "logback.xml"
+ owner "jetty"
+ group "jetty"
+ mode "0755"
+end \ No newline at end of file
diff --git a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/SDC_Simulator_4_locate_keystore.rb b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/SDC_Simulator_4_locate_keystore.rb
new file mode 100644
index 0000000000..3bb482d89a
--- /dev/null
+++ b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/SDC_Simulator_4_locate_keystore.rb
@@ -0,0 +1,16 @@
+jetty_base="/var/lib/jetty"
+
+directory "Jetty_etcdir_creation" do
+ path "/#{jetty_base}/etc"
+ owner 'jetty'
+ group 'jetty'
+ mode '0755'
+ action :create
+end
+
+cookbook_file "/#{jetty_base}/etc/keystore" do
+ source "keystore"
+ owner "jetty"
+ group "jetty"
+ mode 0755
+end \ No newline at end of file
diff --git a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/SDC_Simulator_5_create_jetty_modules.rb b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/SDC_Simulator_5_create_jetty_modules.rb
new file mode 100644
index 0000000000..38b87fa65d
--- /dev/null
+++ b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/SDC_Simulator_5_create_jetty_modules.rb
@@ -0,0 +1,14 @@
+jetty_base="/var/lib/jetty"
+jetty_home="/usr/local/jetty"
+
+###### create Jetty modules
+bash "create-jetty-modules" do
+cwd "#{jetty_base}"
+code <<-EOH
+ cd "#{jetty_base}"
+ java -jar "/#{jetty_home}"/start.jar --add-to-start=deploy
+ java -jar "/#{jetty_home}"/start.jar --add-to-startd=http,https,logging,setuid
+EOH
+not_if "ls /#{jetty_base}/start.d/https.ini"
+end
+
diff --git a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/sanityTests_1_cleanup_jettydir.rb b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/sanityTests_1_cleanup_jettydir.rb
new file mode 100644
index 0000000000..112cc4c2e7
--- /dev/null
+++ b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/sanityTests_1_cleanup_jettydir.rb
@@ -0,0 +1,49 @@
+tests_base="/var/lib/tests"
+
+ remote_directory '/var/lib/tests/testSuites' do
+ source 'testSuites'
+ owner 'root'
+ group 'root'
+ mode '0755'
+ action :create
+ end
+
+ remote_directory '/var/lib/tests/Files' do
+ source 'Files'
+ owner 'root'
+ group 'root'
+ mode '0755'
+ action :create
+ end
+
+ remote_directory '/var/lib/tests/conf' do
+ source 'conf'
+ owner 'root'
+ group 'root'
+ mode '0755'
+ action :create
+ end
+
+ directory "create_target_dir" do
+ path "/var/lib/tests/target"
+ owner 'root'
+ group 'root'
+ mode '0755'
+ action :create
+ end
+
+ directory "create_ExtentReport_dir" do
+ path "/var/lib/tests/ExtentReport"
+ owner 'root'
+ group 'root'
+ mode '0755'
+ action :create
+ end
+
+ cookbook_file '/var/lib/tests/startTest.sh' do
+ source 'startTest.sh'
+ owner 'root'
+ group 'root'
+ mode '0755'
+ action :create
+ end \ No newline at end of file
diff --git a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/sanityTests_2_setup_configuration.rb b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/sanityTests_2_setup_configuration.rb
new file mode 100644
index 0000000000..cf6875746e
--- /dev/null
+++ b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/sanityTests_2_setup_configuration.rb
@@ -0,0 +1,43 @@
+tests_base="/var/lib/tests"
+
+template "sdc-yaml-config" do
+ path "#{tests_base}/conf/sdc.yaml"
+ source "sdc-sanity.yaml.erb"
+ owner "root"
+ group "root"
+ mode "0755"
+ variables ({
+ :target_path => "#{tests_base}/target",
+ :catalogBE_ip => node['Nodes']['BE'],
+ :catalogBE_port => node['BE'][:http_port],
+ :webportal_ip => node['Nodes']['FE'],
+ :webportal_port => node['FE'][:http_port],
+ :titan_file => "#{tests_base}/conf/titan.properties",
+ :tests_base_ci => "#{tests_base}/CI/tests",
+ :components_path => "#{tests_base}/CI/components",
+ :importResourceConfigDir => "#{tests_base}/CI/importResource",
+ :importTypesDir => "#{tests_base}/CI/importTypesTest",
+ :importResourceTestsConfigDir => "#{tests_base}/CI/importResourceTests",
+ :ConfigurationFile => "#{tests_base}/conf/configuration.yaml",
+ :errorConfigurationFile => "#{tests_base}/conf/error-configuration.yaml",
+ :CASSANDRA_IP => node['Nodes']['CS'],
+ :CASSANDRA_PWD => node['cassandra'][:cassandra_password],
+ :CASSANDRA_USR => node['cassandra'][:cassandra_user]
+ })
+end
+
+replication_factor=1
+template "titan.properties" do
+ path "/#{tests_base}/conf/titan.properties"
+ source "BE-titan.properties.erb"
+ owner "root"
+ group "root"
+ mode "0755"
+ variables({
+ :CASSANDRA_IP => node['Nodes']['CS'],
+ :CASSANDRA_PWD => node['cassandra'][:cassandra_password],
+ :CASSANDRA_USR => node['cassandra'][:cassandra_user],
+ :rep_factor => replication_factor,
+ :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment
+ })
+end \ No newline at end of file
diff --git a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/sanityTests_3_sanity_execution.rb b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/sanityTests_3_sanity_execution.rb
new file mode 100644
index 0000000000..6f10a33dd6
--- /dev/null
+++ b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/sanityTests_3_sanity_execution.rb
@@ -0,0 +1,13 @@
+tests_base="/var/lib/tests"
+ci_test_suite="onap.xml"
+
+bash "run asdc ci sanity tests" do
+cwd "#{tests_base}"
+code <<-EOH
+ cd "#{tests_base}"
+ jar_file=`ls test-apis*-jar-with-dependencies.jar`
+ ./startTest.sh $jar_file #{ci_test_suite}
+ echo "return code from startTest.sh = [$?]"
+EOH
+timeout 72000
+end \ No newline at end of file
diff --git a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/templates/default/BE-titan.properties.erb b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/templates/default/BE-titan.properties.erb
index 27386d47ef..a42c7bf206 100644
--- a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/templates/default/BE-titan.properties.erb
+++ b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/templates/default/BE-titan.properties.erb
@@ -4,6 +4,7 @@ storage.port=9160
storage.username=<%= @CASSANDRA_USR %>
storage.password=<%= @CASSANDRA_PWD %>
storage.connection-timeout=10000
+storage.cassandra.keyspace=sdctitan
storage.cassandra.ssl.enabled=false
storage.cassandra.ssl.truststore.location=/var/lib/jetty/config/.truststore
diff --git a/sdc-os-chef/sdc-sanity/chef-solo/roles/sanityTests.json b/sdc-os-chef/sdc-sanity/chef-solo/roles/sanityTests.json
new file mode 100644
index 0000000000..74f12c7cc6
--- /dev/null
+++ b/sdc-os-chef/sdc-sanity/chef-solo/roles/sanityTests.json
@@ -0,0 +1,23 @@
+{
+ "name": "sanityTests",
+ "description": "Execute sanity tests",
+ "json_class": "Chef::Role",
+ "default_attributes": {
+
+ },
+ "override_attributes": {
+
+ },
+ "chef_type": "role",
+ "run_list": [
+ "recipe[sdc-sanity::sanityTests_1_cleanup_jettydir]",
+ "recipe[sdc-sanity::sanityTests_2_setup_configuration]",
+ "recipe[sdc-sanity::sanityTests_3_sanity_execution]"
+// "recipe[sdc-simulator::SDC_Simulator_3_logback]",
+// "recipe[sdc-simulator::SDC_Simulator_4_locate_keystore]",
+// "recipe[sdc-simulator::SDC_Simulator_5_create_jetty_modules]"
+ ],
+ "env_run_lists": {
+ }
+}
+
diff --git a/sdc-os-chef/sdc-sanity/chef-solo/solo.json b/sdc-os-chef/sdc-sanity/chef-solo/solo.json
index 5bd228127d..6487d4cc4e 100644
--- a/sdc-os-chef/sdc-sanity/chef-solo/solo.json
+++ b/sdc-os-chef/sdc-sanity/chef-solo/solo.json
@@ -1,4 +1,6 @@
{
- "run_list": [ "recipe[sdc-sanity::setup_sanity]" ]
+ "run_list": [
+ "role[sanityTests]"
+ ]
}
diff --git a/sdc-os-chef/sdc-sanity/startup.sh b/sdc-os-chef/sdc-sanity/startup.sh
index 374a0e8c34..d4316c383f 100644
--- a/sdc-os-chef/sdc-sanity/startup.sh
+++ b/sdc-os-chef/sdc-sanity/startup.sh
@@ -6,13 +6,15 @@ chef-solo -c solo.rb -E ${CHEFNAME}
rc=$?
-if [[ $rc != 0 ]]; then
- echo "Sanity failed !!!"
- exit $rc
-else
- echo "completed successfully :-)"
- exit 0
-fi
+#if [[ $rc != 0 ]]; then
+# echo "Sanity failed !!!"
+# exit $rc
+#else
+# echo "completed successfully :-)"
+# exit 0
+#fi
-#/docker-entrypoint.sh
+while true; do sleep 2; done
+
+##/docker-entrypoint.sh