]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - org.argeo.slc.agent/src/main/java/org/argeo/slc/ant/unit/MinimalAntClasspathTestCase.java
Restrcuture the location of the execution server
[gpl/argeo-slc.git] / org.argeo.slc.agent / src / main / java / org / argeo / slc / ant / unit / MinimalAntClasspathTestCase.java
index df07c9687c04a518e4aae76ff28454a7f61517ef..bf6c0b603da303add6d37d3d7041018f15fb6c46 100644 (file)
@@ -1,14 +1,18 @@
 package org.argeo.slc.ant.unit;
 
 import java.io.File;
+import java.util.UUID;
 
 import org.argeo.slc.ant.AntConstants;
+import org.argeo.slc.ant.AntExecutionContext;
 import org.argeo.slc.ant.AntSlcApplication;
 import org.argeo.slc.core.process.SlcExecution;
+import org.argeo.slc.runtime.SlcExecutionOutput;
 import org.argeo.slc.unit.AbstractSpringTestCase;
 import org.springframework.core.io.FileSystemResource;
 
-public class MinimalAntClasspathTestCase extends AbstractSpringTestCase {
+public class MinimalAntClasspathTestCase extends AbstractSpringTestCase
+               implements SlcExecutionOutput<AntExecutionContext> {
        protected void execute(String scriptPath) {
                AntSlcApplication slcApp = new AntSlcApplication();
                slcApp.setRootDir(new FileSystemResource(new File("src/test/resources")
@@ -18,10 +22,16 @@ public class MinimalAntClasspathTestCase extends AbstractSpringTestCase {
                slcApp.setParentContext(getContext());
 
                SlcExecution slcExecution = new SlcExecution();
+               slcExecution.setUuid(UUID.randomUUID().toString());
                slcExecution.getAttributes().put(AntConstants.EXECATTR_ANT_FILE,
                                scriptPath);
+               slcExecution.setUser("user");
 
-               slcApp.execute(slcExecution, null, null, null);
+               slcApp.execute(slcExecution, null, null, this);
+       }
+
+       /** to be overridden */
+       public void postExecution(AntExecutionContext executionContext) {
        }
 
 }