test: add godzilla ws case

This commit is contained in:
ReaJason
2025-05-14 00:34:32 +08:00
parent cae0a38a7a
commit 06dc282cff
@@ -24,7 +24,7 @@ class GodzillaManagerTest {
@Test @Test
@Disabled("only for local test") @Disabled("only for local test")
void testManager() { void testHttpManager() {
try (GodzillaManager manager = GodzillaManager.builder() try (GodzillaManager manager = GodzillaManager.builder()
.entrypoint("http://localhost:8080/app/") .entrypoint("http://localhost:8080/app/")
.header("User-Agent", "test Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0") .header("User-Agent", "test Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0")
@@ -37,6 +37,20 @@ class GodzillaManagerTest {
} }
} }
@Test
@Disabled("only for local test")
void testWsManager() {
try (GodzillaManager manager = GodzillaManager.builder()
.entrypoint("ws://127.0.0.1:8082/app/god")
.pass("pass")
.key("key")
.build()) {
assertTrue(manager.start());
assertTrue(manager.test());
} catch (IOException ignored) {
}
}
@Test @Test
void generateGodzilla() { void generateGodzilla() {
byte[] bytes = GodzillaManager.generateGodzilla(); byte[] bytes = GodzillaManager.generateGodzilla();