Thomas Vachuska

Fixing an issue with app activation.

Adding a log check as part of archetypes scenario.

Change-Id: Iad53c5430530513939ef92a890559f9841e9ecc1
......@@ -370,8 +370,11 @@ public class ApplicationArchive
*/
protected boolean setActive(String appName) {
try {
return appFile(appName, "active").createNewFile() && updateTime(appName);
File active = appFile(appName, "active");
createParentDirs(active);
return active.createNewFile() && updateTime(appName);
} catch (IOException e) {
log.warn("Unable to mark app {} as active", appName, e);
throw new ApplicationException("Unable to mark app as active", e);
}
}
......
......@@ -20,6 +20,7 @@ import com.google.common.io.ByteStreams;
import com.google.common.io.Files;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.onlab.util.Tools;
import org.onosproject.app.ApplicationDescription;
......@@ -149,6 +150,7 @@ public class ApplicationArchiveTest {
}
@Test(expected = ApplicationException.class)
@Ignore("No longer needed")
public void setBadActive() throws IOException {
aar.setActive("org.foo.BAD");
}
......
......@@ -76,5 +76,9 @@
<step name="Uninstall-App" requires="^"
exec="onos-app ${OCI} uninstall org.foo.app"/>
<parallel var="${OC#}">
<step name="Archetypes-Check-Logs-${#}" exec="onos-check-logs ${OC#}"/>
</parallel>
</group>
</scenario>
......