diff --git a/Core/src/org/sleuthkit/autopsy/integrationtesting/IntegrationTestService.java b/Core/src/org/sleuthkit/autopsy/integrationtesting/IntegrationTestService.java index 752959d5d3..d2c04a98fc 100644 --- a/Core/src/org/sleuthkit/autopsy/integrationtesting/IntegrationTestService.java +++ b/Core/src/org/sleuthkit/autopsy/integrationtesting/IntegrationTestService.java @@ -129,7 +129,9 @@ public class IntegrationTestService { EnvConfig envConfig = config.getEnvConfig(); // iterate through test suites if any exist - if (!CollectionUtils.isEmpty(config.getTestSuites())) { + if (CollectionUtils.isEmpty(config.getTestSuites())) { + logger.log(Level.WARNING, "No test suites discovered. No tests will be run."); + } else { for (TestSuiteConfig testSuiteConfig : config.getTestSuites()) { for (CaseType caseType : IntegrationCaseType.getCaseTypes(testSuiteConfig.getCaseTypes())) { try { diff --git a/Core/src/org/sleuthkit/autopsy/integrationtesting/config/IntegrationTestConfig.java b/Core/src/org/sleuthkit/autopsy/integrationtesting/config/IntegrationTestConfig.java index b5b347033c..c51d8bc59f 100644 --- a/Core/src/org/sleuthkit/autopsy/integrationtesting/config/IntegrationTestConfig.java +++ b/Core/src/org/sleuthkit/autopsy/integrationtesting/config/IntegrationTestConfig.java @@ -50,7 +50,7 @@ public class IntegrationTestConfig { * @return A list of test suite configurations. */ public List getTestSuites() { - return Collections.unmodifiableList(testSuites); + return testSuites == null ? Collections.emptyList() : Collections.unmodifiableList(testSuites); } /** diff --git a/Core/src/org/sleuthkit/autopsy/integrationtesting/config/ParameterizedResourceConfig.java b/Core/src/org/sleuthkit/autopsy/integrationtesting/config/ParameterizedResourceConfig.java index d1011bf9df..00485dde98 100644 --- a/Core/src/org/sleuthkit/autopsy/integrationtesting/config/ParameterizedResourceConfig.java +++ b/Core/src/org/sleuthkit/autopsy/integrationtesting/config/ParameterizedResourceConfig.java @@ -206,6 +206,6 @@ public class ParameterizedResourceConfig { * long, double, string. */ public Map getParameters() { - return Collections.unmodifiableMap(parameters); + return parameters == null ? Collections.emptyMap() : Collections.unmodifiableMap(parameters); } } diff --git a/Core/src/org/sleuthkit/autopsy/integrationtesting/config/TestSuiteConfig.java b/Core/src/org/sleuthkit/autopsy/integrationtesting/config/TestSuiteConfig.java index 2d95f0e400..bc050fdb87 100644 --- a/Core/src/org/sleuthkit/autopsy/integrationtesting/config/TestSuiteConfig.java +++ b/Core/src/org/sleuthkit/autopsy/integrationtesting/config/TestSuiteConfig.java @@ -82,7 +82,7 @@ public class TestSuiteConfig { * @return The data sources to be ingested. */ public List getDataSources() { - return Collections.unmodifiableList(dataSources); + return dataSources == null ? Collections.emptyList() : Collections.unmodifiableList(dataSources); } /** @@ -90,7 +90,7 @@ public class TestSuiteConfig { * environment. */ public List getConfigurationModules() { - return Collections.unmodifiableList(configurationModules); + return configurationModules == null ? Collections.emptyList() : Collections.unmodifiableList(configurationModules); } /** diff --git a/Core/src/org/sleuthkit/autopsy/integrationtesting/config/TestingConfig.java b/Core/src/org/sleuthkit/autopsy/integrationtesting/config/TestingConfig.java index 37ce9923a0..8cd7f81509 100644 --- a/Core/src/org/sleuthkit/autopsy/integrationtesting/config/TestingConfig.java +++ b/Core/src/org/sleuthkit/autopsy/integrationtesting/config/TestingConfig.java @@ -79,7 +79,7 @@ public class TestingConfig { * will be used. If that is not specified, all tests will be run. */ public Set getExcludeAllExcept() { - return new HashSet<>(excludeAllExcept.values()); + return excludeAllExcept == null ? Collections.emptySet() : new HashSet<>(excludeAllExcept.values()); } /** @@ -88,7 +88,7 @@ public class TestingConfig { * will be run. */ public Set getIncludeAllExcept() { - return Collections.unmodifiableSet(includeAllExcept); + return includeAllExcept == null ? Collections.emptySet() : Collections.unmodifiableSet(includeAllExcept); } /**