From 26c706a411c26e452f3b43469d1ef39fe2117219 Mon Sep 17 00:00:00 2001 From: Rsl1122 Date: Thu, 27 Dec 2018 19:05:56 +0200 Subject: [PATCH] Fixed BungeeSystemTest#testEnableNoMySQL Test was failing because travis runs MySQL on 3306 port with root user, these were default Plan settings. Fixed by removing message expectation on travis --- .../test/java/com/djrapitops/plan/BungeeSystemTest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Plan/bungeecord/src/test/java/com/djrapitops/plan/BungeeSystemTest.java b/Plan/bungeecord/src/test/java/com/djrapitops/plan/BungeeSystemTest.java index c79fef795..6d1901d33 100644 --- a/Plan/bungeecord/src/test/java/com/djrapitops/plan/BungeeSystemTest.java +++ b/Plan/bungeecord/src/test/java/com/djrapitops/plan/BungeeSystemTest.java @@ -8,7 +8,6 @@ import com.djrapitops.plan.api.exceptions.EnableException; import com.djrapitops.plan.system.PlanSystem; import com.djrapitops.plan.system.database.DBSystem; import com.djrapitops.plan.system.settings.config.PlanConfig; -import com.djrapitops.plan.system.settings.paths.DatabaseSettings; import com.djrapitops.plan.system.settings.paths.ProxySettings; import com.djrapitops.plan.system.settings.paths.WebserverSettings; import org.junit.ClassRule; @@ -20,6 +19,7 @@ import org.junit.runner.RunWith; import org.mockito.junit.MockitoJUnitRunner; import rules.BungeeComponentMocker; import rules.ComponentMocker; +import utilities.CIProperties; import utilities.RandomData; /** @@ -60,12 +60,13 @@ public class BungeeSystemTest { @Test public void bungeeDoesNotEnableWithDefaultIP() throws Exception { thrown.expect(EnableException.class); - thrown.expectMessage("IP setting still 0.0.0.0 - Configure AlternativeIP/IP that connects to the Proxy server."); + if (!Boolean.parseBoolean(System.getenv(CIProperties.IS_TRAVIS))) { + thrown.expectMessage("IP setting still 0.0.0.0 - Configure AlternativeIP/IP that connects to the Proxy server."); + } PlanSystem bungeeSystem = component.getPlanSystem(); try { PlanConfig config = bungeeSystem.getConfigSystem().getConfig(); - config.set(DatabaseSettings.MYSQL_PORT, "6000"); config.set(WebserverSettings.PORT, TEST_PORT_NUMBER); config.set(ProxySettings.IP, "0.0.0.0");