aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plans/dcaegen2-collectors-datafile/ManagementInterface-suite/docker-compose.yml8
-rw-r--r--plans/dcaegen2-collectors-datafile/ManagementInterface-suite/setup.sh31
-rw-r--r--plans/dcaegen2-collectors-datafile/ManagementInterface-suite/teardown.sh3
-rwxr-xr-xplans/dcaegen2-collectors-datafile/ManagementInterface-suite/testplan.txt3
-rwxr-xr-xtests/dcaegen2-collectors-datafile/testsuites/ManagementInterface-suite/MI.robot74
-rwxr-xr-xtests/dcaegen2-collectors-datafile/testsuites/ManagementInterface-suite/__init__.robot2
6 files changed, 121 insertions, 0 deletions
diff --git a/plans/dcaegen2-collectors-datafile/ManagementInterface-suite/docker-compose.yml b/plans/dcaegen2-collectors-datafile/ManagementInterface-suite/docker-compose.yml
new file mode 100644
index 00000000..b95842ba
--- /dev/null
+++ b/plans/dcaegen2-collectors-datafile/ManagementInterface-suite/docker-compose.yml
@@ -0,0 +1,8 @@
+version: '2'
+services:
+ dfc:
+ image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.datafile.datafile-app-server:latest
+ container_name: dfc
+ ports:
+ - "8100:8100"
+ - "8433:8433"
diff --git a/plans/dcaegen2-collectors-datafile/ManagementInterface-suite/setup.sh b/plans/dcaegen2-collectors-datafile/ManagementInterface-suite/setup.sh
new file mode 100644
index 00000000..af24717a
--- /dev/null
+++ b/plans/dcaegen2-collectors-datafile/ManagementInterface-suite/setup.sh
@@ -0,0 +1,31 @@
+#!/usr/bin/env bash
+
+docker-compose up -d
+
+
+DFC=$(docker ps -a -q --filter="name=dfc")
+
+# Wait for initialization of Docker contaienr for DFC
+for i in {1..10}; do
+if [ $(docker inspect --format '{{ .State.Running }}' $DFC) ]
+then
+ echo "DFC Container Running"
+ break
+else
+ echo sleep $i
+ sleep $i
+fi
+done
+
+#Wait for initialization of the DFC service
+for i in {1..10}; do
+if [ $(curl -so /dev/null -w '%{response_code}' http://localhost:8100/heartbeat ) -eq 200 ]
+then
+ echo "DFC Service running"
+ break
+else
+ echo sleep $i
+ sleep $i
+fi
+done
+
diff --git a/plans/dcaegen2-collectors-datafile/ManagementInterface-suite/teardown.sh b/plans/dcaegen2-collectors-datafile/ManagementInterface-suite/teardown.sh
new file mode 100644
index 00000000..bb0ac923
--- /dev/null
+++ b/plans/dcaegen2-collectors-datafile/ManagementInterface-suite/teardown.sh
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+kill-instance.sh dfc \ No newline at end of file
diff --git a/plans/dcaegen2-collectors-datafile/ManagementInterface-suite/testplan.txt b/plans/dcaegen2-collectors-datafile/ManagementInterface-suite/testplan.txt
new file mode 100755
index 00000000..1f4ea93e
--- /dev/null
+++ b/plans/dcaegen2-collectors-datafile/ManagementInterface-suite/testplan.txt
@@ -0,0 +1,3 @@
+# Test suites are relative paths under [integration/csit.git]/tests/.
+# Place the suites in run order.
+dcaegen2-collectors-datafile/testsuites/ManagementInterface-suite
diff --git a/tests/dcaegen2-collectors-datafile/testsuites/ManagementInterface-suite/MI.robot b/tests/dcaegen2-collectors-datafile/testsuites/ManagementInterface-suite/MI.robot
new file mode 100755
index 00000000..7020042b
--- /dev/null
+++ b/tests/dcaegen2-collectors-datafile/testsuites/ManagementInterface-suite/MI.robot
@@ -0,0 +1,74 @@
+*** Settings ***
+Library OperatingSystem
+Library RequestsLibrary
+
+*** Variables ***
+
+
+*** Test Cases ***
+
+Heartbeat test
+ [Documentation] Check DFC heartbeat
+ Heartbeat I'm living
+
+Stop test
+ [Documentation] Check DFC stop
+ Stop Datafile Service has already been stopped!
+
+Start test
+ [Documentation] Check DFC start
+ Start Datafile Service has been started!
+
+Heartbeat test - secure
+ [Documentation] Check DFC heartbeat, secure
+ Heartbeat-secure I'm living
+
+Stop test - secure
+ [Documentation] Check DFC stop, secure
+ Stop-secure Datafile Service has already been stopped!
+
+
+Start test - secure
+ [Documentation] Check DFC start, secure
+ Start-secure Datafile Service has been started!
+
+
+#PRobably move definitions of common Keywords to a common file
+
+*** Keywords ***
+#Probably simplyfy the test cases by using variables for port numbers/urls etc
+Heartbeat
+ [Arguments] ${respbody}
+ Create Session session http://localhost:8100/heartbeat
+ ${resp}= Get Request session /
+ Should Be Equal ${resp.text} ${respbody}
+
+Heartbeat-secure
+ [Arguments] ${respbody}
+ Create Session session https://localhost:8433/heartbeat
+ ${resp}= Get Request session /
+ Should Be Equal ${resp.text} ${respbody}
+
+Stop
+ [Arguments] ${respbody}
+ Create Session session http://localhost:8100/stopDatafile
+ ${resp}= Get Request session /
+ Should Be Equal ${resp.text} ${respbody}
+
+Stop-secure
+ [Arguments] ${respbody}
+ Create Session session https://localhost:8433/stopDatafile
+ ${resp}= Get Request session /
+ Should Be Equal ${resp.text} ${respbody}
+
+Start
+ [Arguments] ${respbody}
+ Create Session session http://localhost:8100/start
+ ${resp}= Get Request session /
+ Should Be Equal ${resp.text} ${respbody}
+
+Start-secure
+ [Arguments] ${respbody}
+ Create Session session https://localhost:8433/start
+ ${resp}= Get Request session /
+ Should Be Equal ${resp.text} ${respbody}
diff --git a/tests/dcaegen2-collectors-datafile/testsuites/ManagementInterface-suite/__init__.robot b/tests/dcaegen2-collectors-datafile/testsuites/ManagementInterface-suite/__init__.robot
new file mode 100755
index 00000000..c5ea9c60
--- /dev/null
+++ b/tests/dcaegen2-collectors-datafile/testsuites/ManagementInterface-suite/__init__.robot
@@ -0,0 +1,2 @@
+*** Settings ***
+Documentation Management Interface suite