Prevents jars from being built as part of jar downloading
All checks were successful
KnarCraft/Minecraft-Server-Launcher/pipeline/head This commit looks good
All checks were successful
KnarCraft/Minecraft-Server-Launcher/pipeline/head This commit looks good
This commit is contained in:
parent
e4be75b770
commit
33795a90a9
@ -60,6 +60,9 @@ public final class JarDownloader {
|
||||
continue;
|
||||
}
|
||||
for (String version : type.getVersions()) {
|
||||
if ((type.getName().equals("Spigot") || type.getName().equals("Bukkit")) && version.equals("Latest")) {
|
||||
continue;
|
||||
}
|
||||
gui.setStatus("Downloading " + type.getName() + version + "...");
|
||||
boolean success = type.downloadJar(jarDirectory, version);
|
||||
if (!success) {
|
||||
|
@ -1,6 +1,5 @@
|
||||
package net.knarcraft.minecraftserverlauncher.utility;
|
||||
|
||||
import net.knarcraft.minecraftserverlauncher.Main;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static net.knarcraft.minecraftserverlauncher.utility.CommonFunctions.stringBetween;
|
||||
@ -8,12 +7,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
public class CommonFunctionsTest {
|
||||
|
||||
@Test
|
||||
public void saveProfileTest() {
|
||||
Main.getController().addProfile("Test");
|
||||
Main.getController().saveState();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void stringBetweenTest() {
|
||||
String substring = stringBetween("fish'nchips", "f", "'");
|
||||
|
@ -58,7 +58,7 @@ public class JarDownloaderTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void craftbukkitDownloadTest() throws ConfigurationException, IOException {
|
||||
public void craftBukkitDownloadTest() throws ConfigurationException, IOException {
|
||||
singleDownloadTest(ServerTypeHandler.getByName("Bukkit"));
|
||||
}
|
||||
|
||||
@ -96,6 +96,10 @@ public class JarDownloaderTest {
|
||||
private void singleDownloadTest(ServerType serverType) throws IOException {
|
||||
assertNotNull(serverType);
|
||||
for (String serverVersion : serverType.getVersions()) {
|
||||
if ((serverType.getName().equals("Spigot") || serverType.getName().equals("Bukkit"))
|
||||
&& serverVersion.equals("Latest")) {
|
||||
continue;
|
||||
}
|
||||
System.out.println("Downloading " + serverType.getName() + serverVersion + ".jar");
|
||||
serverType.downloadJar(targetDirectory, serverVersion);
|
||||
assertTrue(new File(targetDirectory + serverType.getName() + serverVersion + ".jar").exists());
|
||||
|
Loading…
Reference in New Issue
Block a user