mirror of
https://github.com/octoleo/plantuml-server.git
synced 2025-02-05 03:58:25 +00:00
improve tests
This commit is contained in:
parent
0154160c7d
commit
df9c10604a
@ -63,7 +63,16 @@ public class ProxyServlet extends HttpServlet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static boolean inTest = false;
|
||||||
|
|
||||||
|
public static void goTest() {
|
||||||
|
inTest = true;
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean forbiddenURL(String full) {
|
public static boolean forbiddenURL(String full) {
|
||||||
|
if (inTest) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (full == null) {
|
if (full == null) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -42,6 +42,7 @@ public abstract class WebappTestCase extends TestCase {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
|
net.sourceforge.plantuml.servlet.ProxyServlet.goTest();
|
||||||
serverUtils.startServer();
|
serverUtils.startServer();
|
||||||
// logger.info(getServerUrl());
|
// logger.info(getServerUrl());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user