fix skin part tests
Some checks failed
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Failing after 22s
Some checks failed
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Failing after 22s
This commit is contained in:
parent
2ea58d8080
commit
a1ad295e0c
@ -9,7 +9,6 @@ import java.awt.*;
|
||||
import java.awt.geom.AffineTransform;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
@Log4j2
|
||||
public class ImageUtils {
|
||||
|
@ -2,7 +2,6 @@ package cc.fascinated.controller;
|
||||
|
||||
import cc.fascinated.model.cache.CachedPlayer;
|
||||
import cc.fascinated.model.cache.CachedPlayerName;
|
||||
import cc.fascinated.model.skin.Skin;
|
||||
import cc.fascinated.service.PlayerService;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package cc.fascinated.tests;
|
||||
|
||||
import cc.fascinated.config.TestRedisConfig;
|
||||
import cc.fascinated.model.skin.Skin;
|
||||
import cc.fascinated.model.skin.ISkinPart;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
|
||||
@ -70,11 +70,14 @@ class PlayerControllerTests {
|
||||
|
||||
@Test
|
||||
public void ensurePlayerSkinPartsLookupSuccess() throws Exception {
|
||||
for (Skin.Parts part : Skin.Parts.values()) {
|
||||
mockMvc.perform(get("/player/" + part.getName() + "/" + testPlayerUuid)
|
||||
.accept(MediaType.IMAGE_PNG)
|
||||
.contentType(MediaType.IMAGE_PNG))
|
||||
.andExpect(status().isOk());
|
||||
for (Enum<?>[] type : ISkinPart.TYPES) {
|
||||
for (Enum<?> part : type) {
|
||||
mockMvc.perform(get("/player/" + part.name().toLowerCase() + "/" + testPlayer)
|
||||
.accept(MediaType.APPLICATION_JSON)
|
||||
.contentType(MediaType.APPLICATION_JSON))
|
||||
.andExpect(status().isOk());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user