Creating tests
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry@131091 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
4d2a519963
commit
1666affe61
|
@ -14,7 +14,7 @@ import org.glassfish.jersey.test.JerseyTest;
|
|||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
public class ContextManagementTest extends JerseyTest{
|
||||
public class ContextManagementTest extends JerseyTest {
|
||||
|
||||
@Override
|
||||
protected Application configure() {
|
||||
|
|
|
@ -0,0 +1,64 @@
|
|||
#!/bin/bash
|
||||
# Creating ROOT
|
||||
ROOT_NAME="myRoot"
|
||||
echo "Going to create ROOT Context with name ${ROOT_NAME}"
|
||||
ROOT_UUID=$(curl -H gcube-scope:/gcube/devNext -X PUT http://localhost:8080/resource-registry/context?name=${ROOT_NAME})
|
||||
echo "Created Context (${ROOT_NAME}) has UUID ${ROOT_UUID}"
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
|
||||
# Creating VO
|
||||
VO_NAME="myVO"
|
||||
echo "Going to create Context with name ${VO_NAME} as child of ${ROOT_UUID} (${ROOT_NAME})"
|
||||
VO_UUID=$(curl -H gcube-scope:/gcube/devNext -X PUT http://localhost:8080/resource-registry/context?name=${VO_NAME}?parentContextId=${ROOT_UUID})
|
||||
echo "Created Context ${VO_NAME} has UUID ${VO_UUID} as child of ${ROOT_UUID} (${ROOT_NAME})"
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
|
||||
# Renaming VO
|
||||
VO_NEW_NAME="myVONewName"
|
||||
echo "Going to rename VO Context from name ${VO_NAME} to ${VO_NEW_NAME}"
|
||||
RENAMED_VO_UUID=$(curl -H gcube-scope:/gcube/devNext -X POST http://localhost:8080/resource-registry/context/rename/${VO_UUID}?name=${VO_NEW_NAME})
|
||||
echo "${VO_UUID}"
|
||||
echo "${RENAMED_VO_UUID}"
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
|
||||
# Moving VO as ROOT
|
||||
echo "Going to move VO Context ${VO_NEW_NAME} as ROOT"
|
||||
MOVED_VO_UUID=$(curl -H gcube-scope:/gcube/devNext -X POST http://localhost:8080/resource-registry/context/move/${VO_UUID})
|
||||
echo "${VO_UUID}"
|
||||
echo "${MOVED_VO_UUID}"
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
|
||||
# Moving VO under myRoot
|
||||
echo "Going to move VO Context ${VO_NEW_NAME} under ROOT again"
|
||||
MOVED_AGAIN_VO_UUID=$(curl -H gcube-scope:/gcube/devNext -X POST http://localhost:8080/resource-registry/context/move/${VO_UUID}?parentContextId=${ROOT_UUID})
|
||||
echo "${VO_UUID}"
|
||||
echo "${MOVED_AGAIN_VO_UUID}"
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
|
||||
# Deleting VO
|
||||
echo "Going to delete VO Context ${VO_NEW_NAME}"
|
||||
DELETED_VO_UUID=$(curl -H gcube-scope:/gcube/devNext -X DELETE http://localhost:8080/resource-registry/context/${VO_UUID})
|
||||
echo "${VO_UUID}"
|
||||
echo "${DELETED_VO_UUID}"
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
|
||||
# Deleting ROOT
|
||||
echo "Going to delete ROOT Context ${ROOT_NAME}"
|
||||
DELETED_ROOT_UUID=$(curl -H gcube-scope:/gcube/devNext -X DELETE http://localhost:8080/resource-registry/context/${ROOT_UUID})
|
||||
echo "${ROOT_UUID}"
|
||||
echo "${DELETED_ROOT_UUID}"
|
||||
echo ""
|
||||
echo ""
|
||||
|
Loading…
Reference in New Issue