Class ConfigUtilsTest

java.lang.Object
ubic.gemma.core.config.ConfigUtilsTest

public class ConfigUtilsTest extends Object
Covers the *_FILE indirection in ConfigUtils.resolveEnvVar(String, java.util.function.Function). Uses the injectable env-source overload because System.setenv does not exist on the JVMs Gemma runs on.
  • Constructor Details

    • ConfigUtilsTest

      public ConfigUtilsTest()
  • Method Details

    • testResolvesFromFileWhenFileSuffixIsSet

      @Test public void testResolvesFromFileWhenFileSuffixIsSet(@TempDir Path tmp) throws IOException
      Throws:
      IOException
    • testTrimsLeadingAndTrailingWhitespace

      @Test public void testTrimsLeadingAndTrailingWhitespace(@TempDir Path tmp) throws IOException
      Throws:
      IOException
    • testFallsBackToDirectEnvVarWhenFileSuffixUnset

      @Test public void testFallsBackToDirectEnvVarWhenFileSuffixUnset()
    • testFallsBackToDirectEnvVarWhenFileSuffixIsBlank

      @Test public void testFallsBackToDirectEnvVarWhenFileSuffixIsBlank()
    • testReturnsNullWhenNeitherIsSet

      @Test public void testReturnsNullWhenNeitherIsSet()
    • testFailsFastWhenFileSuffixPointsToMissingFile

      @Test public void testFailsFastWhenFileSuffixPointsToMissingFile(@TempDir Path tmp)
    • testProductionOverloadReadsSystemEnv

      @Test public void testProductionOverloadReadsSystemEnv()
    • testIntegrationWithFilterEnvironmentVariables

      @Test public void testIntegrationWithFilterEnvironmentVariables(@TempDir Path tmp) throws IOException
      Throws:
      IOException