#2213 minor fixes
This commit is contained in:
parent
e1a49c0954
commit
dce8cd4507
4 changed files with 20 additions and 15 deletions
|
@ -15,21 +15,21 @@
|
|||
*/
|
||||
package org.codelibs.fess.app.web.api.admin.plugin;
|
||||
|
||||
import static org.codelibs.fess.app.web.admin.plugin.AdminPluginAction.getAllInstalledArtifacts;
|
||||
import static org.codelibs.fess.app.web.admin.plugin.AdminPluginAction.getAllAvailableArtifacts;
|
||||
import static org.codelibs.fess.app.web.admin.plugin.AdminPluginAction.installArtifact;
|
||||
import static org.codelibs.fess.app.web.admin.plugin.AdminPluginAction.deleteArtifact;
|
||||
|
||||
import org.codelibs.fess.app.web.api.ApiResult;
|
||||
import org.codelibs.fess.helper.PluginHelper.Artifact;
|
||||
import org.codelibs.fess.util.ComponentUtil;
|
||||
import org.codelibs.fess.app.web.api.admin.FessApiAdminAction;
|
||||
import org.lastaflute.web.Execute;
|
||||
import org.lastaflute.web.response.JsonResponse;
|
||||
import static org.codelibs.fess.app.web.admin.plugin.AdminPluginAction.getAllAvailableArtifacts;
|
||||
import static org.codelibs.fess.app.web.admin.plugin.AdminPluginAction.getAllInstalledArtifacts;
|
||||
import static org.codelibs.fess.app.web.admin.plugin.AdminPluginAction.installArtifact;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.codelibs.fess.app.web.api.ApiResult;
|
||||
import org.codelibs.fess.app.web.api.admin.FessApiAdminAction;
|
||||
import org.codelibs.fess.helper.PluginHelper.Artifact;
|
||||
import org.codelibs.fess.util.ComponentUtil;
|
||||
import org.lastaflute.web.Execute;
|
||||
import org.lastaflute.web.response.JsonResponse;
|
||||
|
||||
public class ApiAdminPluginAction extends FessApiAdminAction {
|
||||
|
||||
// GET /api/admin/plugin/installed
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
package org.codelibs.fess.app.web.api.admin.plugin;
|
||||
|
||||
import org.codelibs.fess.app.web.admin.plugin.DeleteForm;
|
||||
import org.lastaflute.web.validation.Required;
|
||||
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
public class DeleteBody extends DeleteForm {
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package org.codelibs.fess.app.web.api.admin.plugin;
|
||||
|
||||
import org.lastaflute.web.validation.Required;
|
||||
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
import org.lastaflute.web.validation.Required;
|
||||
|
||||
public class InstallBody {
|
||||
@Required
|
||||
@Size(max = 100)
|
||||
|
|
|
@ -139,6 +139,7 @@ public class PluginTests extends CrudTestBase {
|
|||
{
|
||||
checkPutMethod(targetMap, getInstallEndpointSuffix()).then().body("response.status", equalTo(0));
|
||||
|
||||
boolean done = false;
|
||||
for (int i = 0; i < 60; i++) {
|
||||
final List<Map<String, Object>> installed =
|
||||
checkGetMethod(Collections.emptyMap(), getInstalledEndpointSuffix() + "/").body().jsonPath()
|
||||
|
@ -151,12 +152,16 @@ public class PluginTests extends CrudTestBase {
|
|||
continue;
|
||||
}
|
||||
assertTrue(exists);
|
||||
done = true;
|
||||
break;
|
||||
}
|
||||
assertTrue(done);
|
||||
}
|
||||
// Delete
|
||||
{
|
||||
checkDeleteMethod(targetMap).then().body("response.status", equalTo(0));
|
||||
|
||||
boolean done = false;
|
||||
for (int i = 0; i < 60; i++) {
|
||||
final List<Map<String, Object>> installed =
|
||||
checkGetMethod(Collections.emptyMap(), getInstalledEndpointSuffix() + "/").body().jsonPath()
|
||||
|
@ -169,7 +174,10 @@ public class PluginTests extends CrudTestBase {
|
|||
continue;
|
||||
}
|
||||
assertFalse(exists);
|
||||
done = true;
|
||||
break;
|
||||
}
|
||||
assertTrue(done);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue