Add optf-has healthcheck and other test cases

Issue-ID: OPTFRA-204

Change-Id: I847a8ea755190be05537c2f6dd332bc21ddd3728
Signed-off-by: Leonardo Bellini <leonardo.bellini@att.com>
diff --git a/test/csit/scripts/optf-has/has/has-properties/conductor.conf.onap b/test/csit/scripts/optf-has/has/has-properties/conductor.conf.onap
index d3e391c..0f9e749 100644
--- a/test/csit/scripts/optf-has/has/has-properties/conductor.conf.onap
+++ b/test/csit/scripts/optf-has/has/has-properties/conductor.conf.onap
@@ -247,9 +247,15 @@
 #
 # From conductor
 #
+music_new_version = True
 
 # Base URL for Music REST API without a trailing slash. (string value)
 server_url = http://localhost:8080/MUSIC/rest/v2
+version = v2
+music_version = "2.4.22"
+aafuser = conductor
+aafpass = c0nduct0r
+aafns = conductor
 
 # DEPRECATED: List of hostnames (round-robin access) (list value)
 # This option is deprecated for removal.
diff --git a/test/csit/scripts/optf-has/has/has_script.sh b/test/csit/scripts/optf-has/has/has_script.sh
index 242f5f6..a5bf9f9 100755
--- a/test/csit/scripts/optf-has/has/has_script.sh
+++ b/test/csit/scripts/optf-has/has/has_script.sh
@@ -53,21 +53,26 @@
 AAISIM_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' aaisim`
 echo "AAISIM_IP=${AAISIM_IP}"
 
+#onboard conductor into music
+curl -vvvvv --noproxy "*" --request POST http://${MUSIC_IP}:8080/MUSIC/rest/v2/admin/onboardAppWithMusic -H "Content-Type: application/json" --data @${WORKSPACE}/test/csit/tests/optf-has/has/data/onboard.json
+
 # change MUSIC reference to the local instance
 sed  -i -e "s%localhost:8081/%${AAISIM_IP}:8081/%g" /tmp/conductor/properties/conductor.conf
 
 docker run -d --name cond-cont -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf ${IMAGE_NAME}:latest python /usr/local/bin/conductor-controller --config-file=/usr/local/bin/conductor.conf
+sleep 2
 docker run -d --name cond-api -p "8091:8091" -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf ${IMAGE_NAME}:latest python /usr/local/bin/conductor-api --port=8091 -- --config-file=/usr/local/bin/conductor.conf
+sleep 2
 docker run -d --name cond-solv -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf ${IMAGE_NAME}:latest python /usr/local/bin/conductor-solver --config-file=/usr/local/bin/conductor.conf
+sleep 2
 docker run -d --name cond-resv -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf ${IMAGE_NAME}:latest python /usr/local/bin/conductor-reservation --config-file=/usr/local/bin/conductor.conf
+sleep 2
 docker run -d --name cond-data -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf -v ${CERT}:/usr/local/bin/cert.cer -v ${KEY}:/usr/local/bin/cert.key -v ${BUNDLE}:/usr/local/bin/cert.pem ${IMAGE_NAME}:latest python /usr/local/bin/conductor-data --config-file=/usr/local/bin/conductor.conf
+sleep 2
 
 COND_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' cond-api`
 ${WORKSPACE}/test/csit/scripts/optf-has/has/wait_for_port.sh ${COND_IP} 8091
 
-# wait a while before continuing
-sleep 5
-
 echo "inspect docker things for tracing purpose"
 docker inspect cond-data
 docker inspect cond-cont
diff --git a/test/csit/scripts/optf-has/has/has_teardown_script.sh b/test/csit/scripts/optf-has/has/has_teardown_script.sh
index 40a536a..dcf4164 100755
--- a/test/csit/scripts/optf-has/has/has_teardown_script.sh
+++ b/test/csit/scripts/optf-has/has/has_teardown_script.sh
@@ -14,6 +14,11 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+#echo "print meaningful data before scratching everything"
+#docker exec -it music-db /usr/bin/cqlsh -unelson24 -pwinman123 -e 'SELECT * FROM system_schema.keyspaces'
+#docker exec -it music-db /usr/bin/cqlsh -unelson24 -pwinman123 -e 'SELECT * FROM admin.keyspace_master'
+#docker exec -it music-db /usr/bin/cqlsh -unelson24 -pwinman123 -e 'SELECT * FROM conductor.plans'
+
 echo "optf/has scripts docker containers killing";
 docker stop cond-api
 docker stop cond-solv
diff --git a/test/csit/scripts/optf-has/has/simulator_script.sh b/test/csit/scripts/optf-has/has/simulator_script.sh
index 5247282..e5bc43d 100755
--- a/test/csit/scripts/optf-has/has/simulator_script.sh
+++ b/test/csit/scripts/optf-has/has/simulator_script.sh
@@ -59,7 +59,7 @@
 ${WORKSPACE}/test/csit/scripts/optf-has/has/wait_for_port.sh ${AAISIM_IP} 8081
 
 # wait a while before continuing
-sleep 5
+sleep 2
 
 echo "inspect docker things for tracing purpose"
 docker inspect aaisim