test: add tomcat6-jdk6 integration-test

This commit is contained in:
ReaJason
2024-11-29 18:05:28 +08:00
parent 645ffbf51f
commit 2d6f523075
3 changed files with 4 additions and 11 deletions
@@ -24,5 +24,5 @@ public class ShellConfig {
@Builder.Default
private String urlPattern = "/*";
@Builder.Default
private int targetJdkVersion = Opcodes.V1_5;
private int targetJdkVersion = Constants.DEFAULT_VERSION;
}
@@ -14,14 +14,6 @@ import godzilla.BaseGodzillaTest;
*/
public interface GodzillaTest extends BaseGodzillaTest {
default String generateGodzillaJsp(GodzillaShellConfig config, String shellType) {
Server server = Server.TOMCAT;
ShellTool shellTool = ShellTool.Godzilla;
GenerateResult generateResult = GeneratorMain.generate(server, shellTool, shellType, config);
JspPacker jspPacker = new JspPacker();
return new String(jspPacker.pack(generateResult));
}
default String generateGodzillaJsp(GodzillaShellConfig config, String shellType, int targetJdkVersion) {
Server server = Server.TOMCAT;
ShellTool shellTool = ShellTool.Godzilla;
@@ -26,10 +26,11 @@ public class TomcatGodzillaTest implements GodzillaTest {
public static final MountableFile warFile = MountableFile.forHostPath(Paths.get("../vul-webapp/build/libs/vul-webapp.war").toAbsolutePath());
public static final MountableFile warJakartaFile = MountableFile.forHostPath(Paths.get("../vul-webapp-jakarta/build/libs/vul-webapp-jakarta.war").toAbsolutePath());
public static final String tomcat6ImageName = "tomcat:6.0.53-jre7";
// https://hub.docker.com/_/tomcat/tags
public static final String tomcat6ImageName = "reajason/tomcat:6-jdk6";
public static final String tomcat7ImageName = "tomcat:7.0.85-jre7";
public static final String tomcat8ImageName = "tomcat:8-jre8";
public static final String tomcat9ImageName = "tomcat:9-jre8";
public static final String tomcat9ImageName = "tomcat:9-jre9";
public static final String tomcat10ImageName = "tomcat:10.1-jre11";
public static final String tomcat11ImageName = "tomcat:11.0-jre17";