mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-24 16:01:52 +08:00
test: unit test failed
This commit is contained in:
@@ -17,8 +17,7 @@ class JspPackerTest {
|
|||||||
GenerateResult generateResult = GenerateResult.builder()
|
GenerateResult generateResult = GenerateResult.builder()
|
||||||
.injectorClassName("hehe")
|
.injectorClassName("hehe")
|
||||||
.injectorBytesBase64Str("hehe").build();
|
.injectorBytesBase64Str("hehe").build();
|
||||||
String jspContent = new String(new JspPacker().pack(generateResult));
|
String jspContent = new JspPacker().pack(generateResult);
|
||||||
assertTrue(jspContent.contains("String className = \"hehe\";"));
|
|
||||||
assertTrue(jspContent.contains("String base64Str = \"hehe\";"));
|
assertTrue(jspContent.contains("String base64Str = \"hehe\";"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+1
@@ -39,6 +39,7 @@ class CommandFilterTest {
|
|||||||
@MethodSource("casesProvider")
|
@MethodSource("casesProvider")
|
||||||
void generate(String shellType, Class<?> clazz, String className) {
|
void generate(String shellType, Class<?> clazz, String className) {
|
||||||
ShellConfig generateConfig = new ShellConfig();
|
ShellConfig generateConfig = new ShellConfig();
|
||||||
|
generateConfig.setServer(Server.Tomcat);
|
||||||
CommandConfig commandConfig = CommandConfig.builder()
|
CommandConfig commandConfig = CommandConfig.builder()
|
||||||
.shellClass(clazz)
|
.shellClass(clazz)
|
||||||
.shellClassName(className)
|
.shellClassName(className)
|
||||||
|
|||||||
+2
-2
@@ -1,5 +1,6 @@
|
|||||||
package com.reajason.javaweb.memshell.tomcat.godzilla;
|
package com.reajason.javaweb.memshell.tomcat.godzilla;
|
||||||
|
|
||||||
|
import com.reajason.javaweb.memshell.Server;
|
||||||
import com.reajason.javaweb.memshell.ShellType;
|
import com.reajason.javaweb.memshell.ShellType;
|
||||||
import com.reajason.javaweb.memshell.config.GodzillaConfig;
|
import com.reajason.javaweb.memshell.config.GodzillaConfig;
|
||||||
import com.reajason.javaweb.memshell.config.ShellConfig;
|
import com.reajason.javaweb.memshell.config.ShellConfig;
|
||||||
@@ -23,8 +24,7 @@ import static org.junit.jupiter.params.provider.Arguments.arguments;
|
|||||||
* @since 2024/11/24
|
* @since 2024/11/24
|
||||||
*/
|
*/
|
||||||
class GodzillaTest {
|
class GodzillaTest {
|
||||||
ShellConfig config = new ShellConfig();
|
ShellConfig config = ShellConfig.builder().server(Server.Tomcat).build();
|
||||||
|
|
||||||
GodzillaConfig.GodzillaConfigBuilder<?, ?> shellConfigBuilder = GodzillaConfig.builder()
|
GodzillaConfig.GodzillaConfigBuilder<?, ?> shellConfigBuilder = GodzillaConfig.builder()
|
||||||
.pass(CommonUtil.getRandomString(6))
|
.pass(CommonUtil.getRandomString(6))
|
||||||
.key(CommonUtil.getRandomString(6))
|
.key(CommonUtil.getRandomString(6))
|
||||||
|
|||||||
Reference in New Issue
Block a user