This commit is contained in:
Greg DiCristofaro 2020-10-29 10:59:15 -04:00
parent 75297a7a0c
commit ca2f72cd23
5 changed files with 9 additions and 7 deletions

View File

@ -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 {

View File

@ -50,7 +50,7 @@ public class IntegrationTestConfig {
* @return A list of test suite configurations.
*/
public List<TestSuiteConfig> getTestSuites() {
return Collections.unmodifiableList(testSuites);
return testSuites == null ? Collections.emptyList() : Collections.unmodifiableList(testSuites);
}
/**

View File

@ -206,6 +206,6 @@ public class ParameterizedResourceConfig {
* long, double, string.
*/
public Map<String, Object> getParameters() {
return Collections.unmodifiableMap(parameters);
return parameters == null ? Collections.emptyMap() : Collections.unmodifiableMap(parameters);
}
}

View File

@ -82,7 +82,7 @@ public class TestSuiteConfig {
* @return The data sources to be ingested.
*/
public List<String> getDataSources() {
return Collections.unmodifiableList(dataSources);
return dataSources == null ? Collections.emptyList() : Collections.unmodifiableList(dataSources);
}
/**
@ -90,7 +90,7 @@ public class TestSuiteConfig {
* environment.
*/
public List<ParameterizedResourceConfig> getConfigurationModules() {
return Collections.unmodifiableList(configurationModules);
return configurationModules == null ? Collections.emptyList() : Collections.unmodifiableList(configurationModules);
}
/**

View File

@ -79,7 +79,7 @@ public class TestingConfig {
* will be used. If that is not specified, all tests will be run.
*/
public Set<ParameterizedResourceConfig> 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<String> getIncludeAllExcept() {
return Collections.unmodifiableSet(includeAllExcept);
return includeAllExcept == null ? Collections.emptySet() : Collections.unmodifiableSet(includeAllExcept);
}
/**