From eddf69eca8dccab69f6ef08823f06cc5a6106e21 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 22 Oct 2024 09:08:10 +0300 Subject: Drop unused tests --- .../java/com/juick/server/tests/ServerTests.java | 29 ---------------------- 1 file changed, 29 deletions(-) (limited to 'src/test') diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java index 221f4ec8..84034428 100644 --- a/src/test/java/com/juick/server/tests/ServerTests.java +++ b/src/test/java/com/juick/server/tests/ServerTests.java @@ -2076,14 +2076,6 @@ public class ServerTests { assertThat(actor, is(instanceOf(Application.class))); } - @Test - public void hostmeta() throws Exception { - MvcResult result = mockMvc.perform(get("/.well-known/host-meta")).andExpect(status().isOk()) - .andReturn(); - String xrd = result.getResponse().getContentAsString(); - result = mockMvc.perform(get("/.well-known/x-nodeinfo2")).andExpect(status().isOk()).andReturn(); - } - @Test public void pms() throws Exception { jdbcTemplate.execute("DELETE FROM pm"); @@ -2309,27 +2301,6 @@ public class ServerTests { Like zotLike = (Like) jsonMapper.readValue(zotLikeString, Context.class); } - @Test - public void nodeinfo() throws Exception { - MvcResult nodeinfoXRD = mockMvc - .perform(get("/.well-known/nodeinfo").contentType(MediaType.APPLICATION_JSON)) - .andExpect(status().isOk()).andReturn(); - JsonNode node = jsonMapper.readTree(nodeinfoXRD.getResponse().getContentAsString()); - assertThat(node.get("links"), notNullValue()); - String nodeinfoUrl = node.get("links").get(0).get("href").textValue(); - MvcResult nodeinfoData = mockMvc.perform(get(nodeinfoUrl).contentType(MediaType.APPLICATION_JSON)) - .andExpect(status().isOk()).andReturn(); - JsonNode nodeinfo = jsonMapper.readTree(nodeinfoData.getResponse().getContentAsString()); - assertThat(nodeinfo.get("software"), notNullValue()); - assertThat(nodeinfo.get("server"), nullValue()); - MvcResult xnodeinfoData = mockMvc - .perform(get("/.well-known/x-nodeinfo2").contentType(MediaType.APPLICATION_JSON)) - .andExpect(status().isOk()).andReturn(); - JsonNode xnodeinfo = jsonMapper.readTree(xnodeinfoData.getResponse().getContentAsString()); - assertThat(xnodeinfo.get("server"), notNullValue()); - assertThat(xnodeinfo.get("software"), nullValue()); - } - @Test public void anonymousUserFromZero() { User user = userService.getUserByUID(0).orElse(AnonymousUser.INSTANCE); -- cgit v1.2.3