Re-structure csit test folder for javatoscachecker
Initial strcture was based around wrong project name.
Change-Id: If6f00a224d884264476342cd7e7090ece88823f6
Issue-Id: MODELING-26
Signed-off-by: Serban Jora <jora@research.att.com>
diff --git a/test/csit/plans/modeling/javatoscachecker/APIs/setup.sh b/test/csit/plans/modeling-toscaparsers-javatoscachecker/APIs/setup.sh
similarity index 87%
rename from test/csit/plans/modeling/javatoscachecker/APIs/setup.sh
rename to test/csit/plans/modeling-toscaparsers-javatoscachecker/APIs/setup.sh
index 19fc5ed..03d07de 100644
--- a/test/csit/plans/modeling/javatoscachecker/APIs/setup.sh
+++ b/test/csit/plans/modeling-toscaparsers-javatoscachecker/APIs/setup.sh
@@ -18,5 +18,5 @@
#
# Place the scripts in run order:
-source ${WORKSPACE}/test/csit/scripts/modeling/javatoscachecker/setup_containers.sh
+source ${WORKSPACE}/test/csit/scripts/modeling-toscaparsers-javatoscachecker/setup_containers.sh
diff --git a/test/csit/plans/modeling/javatoscachecker/APIs/teardown.sh b/test/csit/plans/modeling-toscaparsers-javatoscachecker/APIs/teardown.sh
similarity index 86%
rename from test/csit/plans/modeling/javatoscachecker/APIs/teardown.sh
rename to test/csit/plans/modeling-toscaparsers-javatoscachecker/APIs/teardown.sh
index 0e149c0..1ecaad4 100644
--- a/test/csit/plans/modeling/javatoscachecker/APIs/teardown.sh
+++ b/test/csit/plans/modeling-toscaparsers-javatoscachecker/APIs/teardown.sh
@@ -17,5 +17,5 @@
# Modifications copyright (c) 2017 AT&T Intellectual Property
#
-source ${WORKSPACE}/test/csit/scripts/modeling/javatoscachecker/teardown_containers.sh
+source ${WORKSPACE}/test/csit/scripts/modeling-toscaparsers-javatoscachecker/teardown_containers.sh
diff --git a/test/csit/plans/modeling-toscaparsers-javatoscachecker/APIs/testplan.txt b/test/csit/plans/modeling-toscaparsers-javatoscachecker/APIs/testplan.txt
new file mode 100644
index 0000000..f59237b
--- /dev/null
+++ b/test/csit/plans/modeling-toscaparsers-javatoscachecker/APIs/testplan.txt
@@ -0,0 +1,3 @@
+# Test suites are relative paths under [integration.git]/test/csit/tests/.
+# Place the suites in run order.
+modeling-toscaparsers-javatoscachecker/APIs
diff --git a/test/csit/scripts/modeling/javatoscachecker/setup_containers.sh b/test/csit/scripts/modeling-toscaparsers-javatoscachecker/setup_containers.sh
similarity index 94%
rename from test/csit/scripts/modeling/javatoscachecker/setup_containers.sh
rename to test/csit/scripts/modeling-toscaparsers-javatoscachecker/setup_containers.sh
index 0b22f61..3521ff1 100644
--- a/test/csit/scripts/modeling/javatoscachecker/setup_containers.sh
+++ b/test/csit/scripts/modeling-toscaparsers-javatoscachecker/setup_containers.sh
@@ -20,7 +20,7 @@
# ECOMP is a trademark and service mark of AT&T Intellectual Property.
#
-echo "This is ${WORKSPACE}/test/csit/modeling/javatoscachecker/setup_containers.sh"
+echo "This is ${WORKSPACE}/test/csit/scripts/modeling-toscaparsers-javatoscachecker/setup_containers.sh"
#start docker image
run-instance.sh nexus3.onap.org:10001/onap/modeling/javatoscachecker:latest modeling_javatoscachecker_1 "-p 8080:8080"
diff --git a/test/csit/scripts/modeling/javatoscachecker/teardown_containers.sh b/test/csit/scripts/modeling-toscaparsers-javatoscachecker/teardown_containers.sh
similarity index 90%
rename from test/csit/scripts/modeling/javatoscachecker/teardown_containers.sh
rename to test/csit/scripts/modeling-toscaparsers-javatoscachecker/teardown_containers.sh
index c3292fb..cca4fe1 100644
--- a/test/csit/scripts/modeling/javatoscachecker/teardown_containers.sh
+++ b/test/csit/scripts/modeling-toscaparsers-javatoscachecker/teardown_containers.sh
@@ -20,7 +20,7 @@
# ECOMP is a trademark and service mark of AT&T Intellectual Property.
#
-echo "This is ${WORKSPACE}/test/csit/modeling/javatoscachecker/teardown_containers.sh"
+echo "This is ${WORKSPACE}/test/csit/scripts/modeling-toscaparsers-javatoscachecker/teardown_containers.sh"
kill-instance.sh modeling_javatoscachecker_1
diff --git a/test/csit/tests/modeling/javatoscachecker/APIs/__init__.robot b/test/csit/tests/modeling-toscaparsers-javatoscachecker/APIs/__init__.robot
similarity index 100%
rename from test/csit/tests/modeling/javatoscachecker/APIs/__init__.robot
rename to test/csit/tests/modeling-toscaparsers-javatoscachecker/APIs/__init__.robot
diff --git a/test/csit/tests/modeling-toscaparsers-javatoscachecker/APIs/basics.robot b/test/csit/tests/modeling-toscaparsers-javatoscachecker/APIs/basics.robot
new file mode 100644
index 0000000..053b282
--- /dev/null
+++ b/test/csit/tests/modeling-toscaparsers-javatoscachecker/APIs/basics.robot
@@ -0,0 +1,62 @@
+*** Settings ***
+Library Collections
+Library RequestsLibrary
+Library OperatingSystem
+Library json
+
+
+*** Test Cases ***
+Check service up/non existent namespace
+ CreateSession checkerservice http://localhost:8080
+ &{headers}= Create Dictionary Accept=application/json
+ ${resp}= Get Request checkerservice /check_template/nosuchcatalog headers=${headers}
+ Should Be Equal As Strings ${resp.status_code} 404
+
+Check standalone template
+ CreateSession checkerservice http://localhost:8080
+ ${data}= Get Binary File ${CURDIR}${/}data${/}standalone.yaml
+ &{headers}= Create Dictionary Accept=application/json
+ ${resp}= Post Request checkerservice /check_template/ data=${data} headers=${headers}
+ Log Response received from checker ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Be Equal As Strings ${resp.text} []
+
+Check standalone template with errors
+ CreateSession checkerservice http://localhost:8080
+ ${data}= Get Binary File ${CURDIR}${/}data${/}standalone_with_errors.yaml
+ &{headers}= Create Dictionary Accept=application/json
+ ${resp}= Post Request checkerservice /check_template/ data=${data} headers=${headers}
+ Log Response received from checker ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Not Be Equal As Strings ${resp.text} []
+
+Check schema new namespace
+ CreateSession checkerservice http://localhost:8080
+ ${data}= Get Binary File ${CURDIR}${/}data${/}test_schema.yaml
+ &{headers}= Create Dictionary Accept=application/json
+ ${resp}= Post Request checkerservice /check_template/test/schema.yaml data=${data} headers=${headers}
+ Log Response received from checker ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Be Equal As Strings ${resp.text} []
+
+Check template in namespace
+ CreateSession checkerservice http://localhost:8080
+ ${data}= Get Binary File ${CURDIR}${/}data${/}test_template.yaml
+ &{headers}= Create Dictionary Accept=application/json
+ ${resp}= Post Request checkerservice /check_template/test/ data=${data} headers=${headers}
+ Log Response received from checker ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Be Equal As Strings ${resp.text} []
+
+Check named template does not exist
+ CreateSession checkerservice http://localhost:8080
+ &{headers}= Create Dictionary Accept=application/json
+ ${resp}= Get Request checkerservice /check_template/test/nosuchtemplate.yaml headers=${headers}
+ Should Be Equal As Strings ${resp.status_code} 404
+
+Check delete existing namespace
+ CreateSession checkerservice http://localhost:8080
+ &{headers}= Create Dictionary Accept=application/json
+ ${resp}= Delete Request checkerservice /check_template/test/ headers=${headers}
+ Log Response received from checker ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
diff --git a/test/csit/tests/modeling/javatoscachecker/APIs/data/standalone.yaml b/test/csit/tests/modeling-toscaparsers-javatoscachecker/APIs/data/standalone.yaml
similarity index 100%
rename from test/csit/tests/modeling/javatoscachecker/APIs/data/standalone.yaml
rename to test/csit/tests/modeling-toscaparsers-javatoscachecker/APIs/data/standalone.yaml
diff --git a/test/csit/tests/modeling/javatoscachecker/APIs/data/standalone_with_errors.yaml b/test/csit/tests/modeling-toscaparsers-javatoscachecker/APIs/data/standalone_with_errors.yaml
similarity index 100%
rename from test/csit/tests/modeling/javatoscachecker/APIs/data/standalone_with_errors.yaml
rename to test/csit/tests/modeling-toscaparsers-javatoscachecker/APIs/data/standalone_with_errors.yaml
diff --git a/test/csit/tests/modeling/javatoscachecker/APIs/data/test_schema.yaml b/test/csit/tests/modeling-toscaparsers-javatoscachecker/APIs/data/test_schema.yaml
similarity index 100%
rename from test/csit/tests/modeling/javatoscachecker/APIs/data/test_schema.yaml
rename to test/csit/tests/modeling-toscaparsers-javatoscachecker/APIs/data/test_schema.yaml
diff --git a/test/csit/tests/modeling/javatoscachecker/APIs/data/test_template.yaml b/test/csit/tests/modeling-toscaparsers-javatoscachecker/APIs/data/test_template.yaml
similarity index 100%
rename from test/csit/tests/modeling/javatoscachecker/APIs/data/test_template.yaml
rename to test/csit/tests/modeling-toscaparsers-javatoscachecker/APIs/data/test_template.yaml
diff --git a/test/csit/tests/modeling/javatoscachecker/APIs/basics.robot b/test/csit/tests/modeling/javatoscachecker/APIs/basics.robot
deleted file mode 100644
index b940708..0000000
--- a/test/csit/tests/modeling/javatoscachecker/APIs/basics.robot
+++ /dev/null
@@ -1,40 +0,0 @@
-*** Settings ***
-Library Collections
-Library RequestsLibrary
-Library OperatingSystem
-Library json
-
-
-*** Test Cases ***
-Check service up
- CreateSession checkerservice http://localhost:8080
- &{headers}= Create Dictionary Content-Type=application/json Accept=application/json
- ${resp}= Get Request checkerservice /check_template/nosuchcatalog headers=${headers}
- Should Be Equal As Strings ${resp.status_code} 404
-
-Check standalone template
- CreateSession checkerservice http://localhost:8080
- ${data}= Get Binary File ${CURDIR}${/}data${/}standalone.yaml
- &{headers}= Create Dictionary Content-Type=application/json Accept=application/json
- ${resp}= Post Request checkerservice /check_template data=${data} headers=${headers}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Check schema new namespace
- CreateSession checkerservice http://localhost:8080
- ${data}= Get Binary File ${CURDIR}${/}data${/}test_schema.yaml
- &{headers}= Create Dictionary Content-Type=application/json Accept=application/json
- ${resp}= Post Request checkerservice /check_template/test/schema.yaml data=${data} headers=${headers}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Check template in namespace
- CreateSession checkerservice http://localhost:8080
- ${data}= Get Binary File ${CURDIR}${/}data${/}test_template.yaml
- &{headers}= Create Dictionary Content-Type=application/json Accept=application/json
- ${resp}= Post Request checkerservice /check_template/test/ data=${data} headers=${headers}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Check delete existing namespace
- CreateSession checkerservice http://localhost:8080
- &{headers}= Create Dictionary Content-Type=application/json Accept=application/json
- ${resp}= Delete Request checkerservice /check_template/test/ headers=${headers}
- Should Be Equal As Strings ${resp.status_code} 200