This commit is contained in:
Brian Neumann-Fopiano committed 2026-08-12 00:42:33 -04:00
1 parent 8a189195ad
commit 12b97b7994
62 files changed
+2878 -706

No files matched your search

@@ -0,0 +1,52 @@
/*
* Iris is a World Generator for Minecraft Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.modded;
import art.arcane.iris.core.pack.PackDownloader;
import org.junit.Test;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
public class ModdedPackInstallerTest {
@Test
public void managedBetaPacksIgnoreTheRequestedBranch() {
assertTrue(ModdedPackInstaller.acceptsBranch("overworld", null));
assertTrue(ModdedPackInstaller.acceptsBranch("underworld", "feature/arbitrary"));
}
@Test
public void nonManagedPacksStillRequireAValidBranch() {
assertTrue(ModdedPackInstaller.acceptsBranch("custom", "stable"));
assertFalse(ModdedPackInstaller.acceptsBranch("custom", null));
assertFalse(ModdedPackInstaller.acceptsBranch("custom", "feature/arbitrary"));
}
@Test
public void startupBatchDefersDatapackRefresh() {
PackDownloader.PackInstallResult changed = new PackDownloader.PackInstallResult("underworld", true, true);
assertFalse(ModdedPackInstaller.shouldRefreshDatapack(changed, false));
assertTrue(ModdedPackInstaller.shouldRefreshDatapack(changed, true));
assertFalse(ModdedPackInstaller.shouldRefreshDatapack(
new PackDownloader.PackInstallResult("underworld", false, false),
true
));
}
}
@@ -0,0 +1,41 @@
/*
* Iris is a World Generator for Minecraft Servers
* Copyright (c) 2026 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package art.arcane.iris.modded;
import org.junit.Test;
import java.util.List;
import static org.junit.Assert.assertEquals;
public class ModdedStartupPackSelectionTest {
@Test
public void managedBetaPacksAreAlwaysInstalledInStableOrder() {
assertEquals(List.of("overworld", "underworld"), ModdedStartup.startupPacks("overworld"));
assertEquals(List.of("overworld", "underworld"), ModdedStartup.startupPacks("underworld"));
}
@Test
public void configuredNonManagedDefaultIsInstalledAfterManagedBetaPacks() {
assertEquals(
List.of("overworld", "underworld", "custom"),
ModdedStartup.startupPacks("custom")
);
}
}