ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1150882 - /incubator/ace/trunk/ace-client-rest/test.sh
Date Mon, 25 Jul 2011 20:19:36 GMT
Author: marrs
Date: Mon Jul 25 20:19:35 2011
New Revision: 1150882

URL: http://svn.apache.org/viewvc?rev=1150882&view=rev
Log:
ACE-151 updated the test script

Modified:
    incubator/ace/trunk/ace-client-rest/test.sh

Modified: incubator/ace/trunk/ace-client-rest/test.sh
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/ace-client-rest/test.sh?rev=1150882&r1=1150881&r2=1150882&view=diff
==============================================================================
--- incubator/ace/trunk/ace-client-rest/test.sh (original)
+++ incubator/ace/trunk/ace-client-rest/test.sh Mon Jul 25 20:19:35 2011
@@ -12,16 +12,36 @@ echo "Workspace is ${WORK}"
 #curl -v -d "{ attributes: { name: 'feature-${RANDOM}', description: 'a random feature' },
tags: { generated: 'true'}}" ${WORK}/feature
 #curl -v -d "{ attributes: { name: 'feature-${RANDOM}', description: 'another random feature'
}, tags: { generated: 'true'}}" ${WORK}/feature
 
-# Add a feature, a distribution and an association between the two
-echo "*** Adding feature, distribution and association..."
+echo "*** Adding artifact, feature, distribution, target and all associations..."
+
+RND=$RANDOM
+BSN=org.apache.bundle${RND}
+VERSION=1.0.0
+NAME=${BSN}-${VERSION}
+ART=`curl -v -d "{attributes: { artifactName: '${NAME}' , mimetype: 'application/vnd.osgi.bundle',
Bundle-Name: '${BSN}', Bundle-SymbolicName: '${BSN}', Bundle-Version: '${VERSION}', url: 'http://localhost:8080/obr/${NAME}.jar',
artifactDescription: 'coolio', processorPid: '' }, tags: { generated: 'true' }}" -w %{redirect_url}
${WORK}/artifact`
+ARTID=`echo ${ART##*/} | perl -MURI::Escape -lne 'print uri_unescape($_)'`
+echo "Artifact is ${ART} => ${ARTID}"
+
 FEAT=`curl -v -d "{ attributes: { name: 'feature-${RANDOM}', description: 'a feature' },
tags: {}}" -w %{redirect_url} ${WORK}/feature`
 FEATID=`echo ${FEAT##*/} | perl -MURI::Escape -lne 'print uri_unescape($_)'`
 echo "Feature is ${FEAT} => ${FEATID}"
+
 DIST=`curl -v -d "{ attributes: { name: 'distribution-${RANDOM}', description: 'a distribution'
}, tags: {}}" -w %{redirect_url} ${WORK}/distribution`
 DISTID=`echo ${DIST##*/} | perl -MURI::Escape -lne 'print uri_unescape($_)'`
 echo "Distribution is ${DIST} => ${DISTID}"
-ASSOC=`curl -v -d "{ attributes: { leftEndpoint: '${FEATID}', leftCardinality: '1', rightEndpoint:
'${DISTID}', rightCardinality: '1' }, tags: {}}" -w %{redirect_url} ${WORK}/feature2distribution`
-echo "Association is ${ASSOC}"
+
+TARGET=`curl -v -d "{ attributes: { id: 'target-${RANDOM}', autoapprove: 'true' }, tags:
{}}" -w %{redirect_url} ${WORK}/target`
+TARGETID=`echo ${TARGET##*/} | perl -MURI::Escape -lne 'print uri_unescape($_)'`
+echo "Target is ${TARGET} => ${TARGETID}"
+
+ASSOC1=`curl -v -d "{ attributes: { leftEndpoint: '${ARTID}', leftCardinality: '1', rightEndpoint:
'${FEATID}', rightCardinality: '1' }, tags: {}}" -w %{redirect_url} ${WORK}/artifact2feature`
+echo "Association is ${ASSOC1}"
+
+ASSOC2=`curl -v -d "{ attributes: { leftEndpoint: '${FEATID}', leftCardinality: '1', rightEndpoint:
'${DISTID}', rightCardinality: '1' }, tags: {}}" -w %{redirect_url} ${WORK}/feature2distribution`
+echo "Association is ${ASSOC2}"
+
+ASSOC3=`curl -v -d "{ attributes: { leftEndpoint: '${DISTID}', leftCardinality: '1', rightEndpoint:
'${TARGETID}', rightCardinality: '1' }, tags: {}}" -w %{redirect_url} ${WORK}/distribution2target`
+echo "Association is ${ASSOC3}"
 
 # Get a list of artifacts
 #curl ${WORK}/artifact
@@ -35,10 +55,6 @@ echo "Association is ${ASSOC}"
 #NAME=${BSN}-${VERSION}
 #curl -v -d "{attributes: { artifactName: '${NAME}' , mimetype: 'application/vnd.osgi.bundle',
Bundle-Name: '${BSN}', Bundle-SymbolicName: '${BSN}', Bundle-Version: '${VERSION}', url: 'http://localhost:8080/obr/${NAME}.jar',
artifactDescription: 'coolio', processorPid: '' }, tags: { generated: 'true' }}" ${WORK}/artifact
 
-# Create a target
-TARGET=`curl -v -d "{ attributes: { id: 'target-${RANDOM}', autoapprove: 'true' }, tags:
{}}" -w %{redirect_url} ${WORK}/target`
-echo "Target is ${TARGET}"
-
 # Commit the workspace
 echo "*** Committing workspace..."
 curl -v -d dummy_data ${WORK}



Mime
View raw message