()
| 83 | |
| 84 | |
| 85 | @Test |
| 86 | public void bug58086e() throws Exception { |
| 87 | Tomcat tomcat = getTomcatInstance(); |
| 88 | |
| 89 | File root = new File("test/deployment"); |
| 90 | tomcat.addWebapp("", root.getAbsolutePath()); |
| 91 | |
| 92 | tomcat.start(); |
| 93 | |
| 94 | DeployTask deployTask = new DeployTask() { |
| 95 | |
| 96 | @Override |
| 97 | public void execute(String command, InputStream istream, String contentType, long contentLength) |
| 98 | throws BuildException { |
| 99 | Assert.assertEquals("/deploy?path=somepath", command); |
| 100 | Assert.assertEquals("application/octet-stream", contentType); |
| 101 | try { |
| 102 | istream.close(); |
| 103 | } catch (IOException ignore) { |
| 104 | // Ignore |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | }; |
| 109 | |
| 110 | setDefaults(deployTask); |
| 111 | |
| 112 | testExecute(deployTask, "http://localhost:" + getPort() + "/context.war"); |
| 113 | } |
| 114 | |
| 115 | private void setDefaults(DeployTask deployTask) { |
| 116 | deployTask.setUrl("someurl"); |
nothing calls this directly
no test coverage detected