MCPcopy Create free account
hub / github.com/apache/tomcat / bug58086e

Method bug58086e

test/org/apache/catalina/ant/TestDeployTask.java:85–113  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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");

Callers

nothing calls this directly

Calls 7

addWebappMethod · 0.95
startMethod · 0.95
setDefaultsMethod · 0.95
testExecuteMethod · 0.95
getTomcatInstanceMethod · 0.80
getPortMethod · 0.65
getAbsolutePathMethod · 0.45

Tested by

no test coverage detected