This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/tomcat-maven-plugin.git
The following commit(s) were added to refs/heads/trunk by this push:
new 30c77e1 Adjust tests
30c77e1 is described below
commit 30c77e1d5abf554e2aa4859896e9086780b22e77
Author: remm <[email protected]>
AuthorDate: Wed Apr 15 09:45:51 2026 +0200
Adjust tests
---
.../tomcat/maven/it/TomcatContainerGoalsIT.java | 9 +++--
.../tomcat/maven/it/TomcatContextGoalsIT.java | 42 ++++++++--------------
2 files changed, 21 insertions(+), 30 deletions(-)
diff --git
a/src/test/java/org/apache/tomcat/maven/it/TomcatContainerGoalsIT.java
b/src/test/java/org/apache/tomcat/maven/it/TomcatContainerGoalsIT.java
index 6eb13e3..bc7a162 100644
--- a/src/test/java/org/apache/tomcat/maven/it/TomcatContainerGoalsIT.java
+++ b/src/test/java/org/apache/tomcat/maven/it/TomcatContainerGoalsIT.java
@@ -48,9 +48,12 @@ public class TomcatContainerGoalsIT extends
AbstractWarProjectIT {
new File(webappHome, "target/tomcat").exists());
logger.info("Verifying container goals output");
- verifier.verifyTextInLog("Manager: list: Listing contexts for virtual
host");
- verifier.verifyTextInLog("Manager: serverinfo");
- verifier.verifyTextInLog("Manager: resources: Listing resources of
all types");
+ verifier.verifyTextInLog("OK - Listed applications for virtual host
[localhost]");
+ verifier.verifyTextInLog("/foo:running:0:foo");
+ verifier.verifyTextInLog("/manager:running:0:");
+ verifier.verifyTextInLog("OK - Server info");
+ verifier.verifyTextInLog("OK - Listed global resources of all types");
+
verifier.verifyTextInLog("UserDatabase:org.apache.catalina.users.MemoryUserDatabase");
logger.info("Error Free Log check");
verifier.verifyErrorFreeLog();
diff --git a/src/test/java/org/apache/tomcat/maven/it/TomcatContextGoalsIT.java
b/src/test/java/org/apache/tomcat/maven/it/TomcatContextGoalsIT.java
index d24d4ec..fcc12ee 100644
--- a/src/test/java/org/apache/tomcat/maven/it/TomcatContextGoalsIT.java
+++ b/src/test/java/org/apache/tomcat/maven/it/TomcatContextGoalsIT.java
@@ -23,52 +23,40 @@ import org.junit.Test;
import java.io.File;
-import static junitx.framework.StringAssert.assertContains;
-import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
-public class TomcatContextGoalsIT
- extends AbstractWarProjectIT
-{
+public class TomcatContextGoalsIT extends AbstractWarProjectIT {
@Override
- protected String getWebappUrl()
- {
+ protected String getWebappUrl() {
return "http://localhost:" + getHttpItPort() + "/foo/";
}
@Override
- protected String getWarArtifactId()
- {
+ protected String getWarArtifactId() {
return "context-goals-test";
}
@Test
- public void testContextGoals()
- throws Exception
- {
+ public void testContextGoals() throws Exception {
final String responseBody = executeVerifyWithGet();
- assertNotNull( "Received message body must not be null.", responseBody
);
- assertContains( "Response must match expected content.", "It works
!!", responseBody );
- assertTrue( "Tomcat folder should exist in target folder of project at
" + webappHome,
- new File( webappHome, "target/tomcat" ).exists() );
+ assertTrue("Tomcat folder should exist in target folder of project at
" + webappHome,
+ new File(webappHome, "target/tomcat").exists());
- logger.info( "Verifying context goals output" );
- verifier.verifyTextInLog( "Manager: list: Listing contexts for virtual
host" );
- verifier.verifyTextInLog( "Manager: redeploy" );
- verifier.verifyTextInLog( "Manager: undeploy" );
- verifier.verifyTextInLog( "Manager: starting" );
- verifier.verifyTextInLog( "Manager: stopping" );
- verifier.verifyTextInLog( "Manager: reloading" );
- verifier.verifyTextInLog( "Listing session information for application
at" );
+ logger.info("Verifying context goals output");
+ verifier.verifyTextInLog("OK - Deployed application at context path
[/foo]");
+ verifier.verifyTextInLog("OK - Undeployed application at context path
[/foo]");
+ verifier.verifyTextInLog("OK - Session information for application at
context path [/foo]");
+ verifier.verifyTextInLog("OK - Reloaded application at context path
[/foo]");
+ verifier.verifyTextInLog("OK - Stopped application at context path
[/foo]");
+ verifier.verifyTextInLog("OK - Started application at context path
[/foo]");
- logger.info( "Error Free Log check" );
+ logger.info("Error Free Log check");
verifier.verifyErrorFreeLog();
}
@Override
- protected int getTimeout()
- {
+ protected int getTimeout() {
return 40000;
}
}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]