Skip to content

Commit

Permalink
Merge 480bf9e into f3fe2ad
Browse files Browse the repository at this point in the history
  • Loading branch information
rpalcolea committed Dec 12, 2018
2 parents f3fe2ad + 480bf9e commit f664754
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/groovy/nebula/test/BaseIntegrationSpec.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ abstract class BaseIntegrationSpec extends Specification {
protected LogLevel logLevel = LogLevel.LIFECYCLE
protected List<File> initScripts = []

private static final LOGGING_LEVEL_ENV_VARIABLE = "NEBULA_TEST_LOGGING_LEVEL"

def setup() {
projectDir = new File("build/nebulatest/${this.class.canonicalName}/${testName.methodName.replaceAll(/\W+/, '-')}").absoluteFile
if (projectDir.exists()) {
Expand All @@ -44,7 +46,11 @@ abstract class BaseIntegrationSpec extends Specification {
* @return
*/
protected LogLevel getLogLevel() {
return logLevel
String levelFromEnv = System.getenv(LOGGING_LEVEL_ENV_VARIABLE)
if(!levelFromEnv) {
return logLevel
}
return LogLevel.valueOf(levelFromEnv)
}

/* Setup */
Expand Down

0 comments on commit f664754

Please sign in to comment.