Skip to content
Snippets Groups Projects
Commit f5346a97 authored by felmer's avatar felmer
Browse files

LMS-2612 update disabled-core-plugins only during updating

SVN: 24584
parent 6c889975
No related branches found
No related tags found
No related merge requests found
...@@ -101,8 +101,8 @@ public class SetDisableTechnologiesVariableAction implements PanelAction ...@@ -101,8 +101,8 @@ public class SetDisableTechnologiesVariableAction implements PanelAction
{ {
appendEntryToConfigFile(configFile, propertiesEntry); appendEntryToConfigFile(configFile, propertiesEntry);
} }
updateDisabledDssPluginsProperty(data, installDir);
} }
updateDisabledDssPluginsProperty(data, installDir);
} }
private void updateDisabledDssPluginsProperty(AutomatedInstallData data, File installDir) private void updateDisabledDssPluginsProperty(AutomatedInstallData data, File installDir)
......
...@@ -94,8 +94,6 @@ public class SetDisableTechnologiesVariableActionTest extends AbstractFileSystem ...@@ -94,8 +94,6 @@ public class SetDisableTechnologiesVariableActionTest extends AbstractFileSystem
AutomatedInstallData data = updateDisabledTechnologyProperties(variables, true); AutomatedInstallData data = updateDisabledTechnologyProperties(variables, true);
assertEquals("proteomics, screening", data.getVariable(DISABLED_TECHNOLOGIES_VARNAME)); assertEquals("proteomics, screening", data.getVariable(DISABLED_TECHNOLOGIES_VARNAME));
assertEquals("[" + DISABLED_CORE_PLUGINS_KEY + " = proteomics, screening]", FileUtilities
.loadToStringList(dssConfigFile).toString());
} }
@Test @Test
...@@ -168,13 +166,14 @@ public class SetDisableTechnologiesVariableActionTest extends AbstractFileSystem ...@@ -168,13 +166,14 @@ public class SetDisableTechnologiesVariableActionTest extends AbstractFileSystem
@Test @Test
public void testUpdateDisabledPluginsForSwitchedTechnologies() public void testUpdateDisabledPluginsForSwitchedTechnologies()
{ {
FileUtilities.writeToFile(configFile, "abc = 123");
FileUtilities.writeToFile(dssConfigFile, "a = b\n" + DISABLED_CORE_PLUGINS_KEY FileUtilities.writeToFile(dssConfigFile, "a = b\n" + DISABLED_CORE_PLUGINS_KEY
+ "= screening, proteomics:a:b\n" + "gamma = alpha"); + "= screening, proteomics:a:b\n" + "gamma = alpha");
Properties variables = new Properties(); Properties variables = new Properties();
variables.setProperty(TECHNOLOGY_PROTEOMICS, "false"); variables.setProperty(TECHNOLOGY_PROTEOMICS, "false");
variables.setProperty(TECHNOLOGY_SCREENING, "true"); variables.setProperty(TECHNOLOGY_SCREENING, "true");
updateDisabledTechnologyProperties(variables, true); updateDisabledTechnologyProperties(variables, false);
assertEquals("[a = b, " + DISABLED_CORE_PLUGINS_KEY + " = proteomics:a:b, proteomics, " assertEquals("[a = b, " + DISABLED_CORE_PLUGINS_KEY + " = proteomics:a:b, proteomics, "
+ "gamma = alpha]", FileUtilities.loadToStringList(dssConfigFile).toString()); + "gamma = alpha]", FileUtilities.loadToStringList(dssConfigFile).toString());
...@@ -183,16 +182,14 @@ public class SetDisableTechnologiesVariableActionTest extends AbstractFileSystem ...@@ -183,16 +182,14 @@ public class SetDisableTechnologiesVariableActionTest extends AbstractFileSystem
@Test @Test
public void testUpdateDisabledPluginsForSameTechnology() public void testUpdateDisabledPluginsForSameTechnology()
{ {
FileUtilities.writeToFile(configFile, "abc = 123");
FileUtilities.writeToFile(dssConfigFile, "a = b\n" + DISABLED_CORE_PLUGINS_KEY FileUtilities.writeToFile(dssConfigFile, "a = b\n" + DISABLED_CORE_PLUGINS_KEY
+ "= proteomics, proteomics:a:b\n" + "gamma = alpha"); + "= proteomics, proteomics:a:b\n" + "gamma = alpha");
Properties variables = new Properties(); Properties variables = new Properties();
variables.setProperty(TECHNOLOGY_PROTEOMICS, "false"); variables.setProperty(TECHNOLOGY_PROTEOMICS, "false");
variables.setProperty(TECHNOLOGY_SCREENING, "true"); variables.setProperty(TECHNOLOGY_SCREENING, "true");
updateDisabledTechnologyProperties(variables, true); updateDisabledTechnologyProperties(variables, false);
assertEquals("[a = b, " + DISABLED_CORE_PLUGINS_KEY + " = proteomics, proteomics:a:b, "
+ "gamma = alpha]", FileUtilities.loadToStringList(dssConfigFile).toString());
} }
private AutomatedInstallData updateDisabledTechnologyProperties(Properties variables, private AutomatedInstallData updateDisabledTechnologyProperties(Properties variables,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment