Created
August 15, 2013 20:15
-
-
Save ncdc/6244399 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/node/test/test_helper.rb b/node/test/test_helper.rb | |
index 7067eda..a7555c3 100644 | |
--- a/node/test/test_helper.rb | |
+++ b/node/test/test_helper.rb | |
@@ -42,7 +42,15 @@ module OpenShift | |
class NodeTestCase < NodeBareTestCase | |
def before_setup | |
log_config = mock() | |
- log_config.stubs(:get).with("PLATFORM_LOG_CLASS").returns("StdoutLogger") | |
+ log_config.stubs(:get).with("PLATFORM_LOG_CLASS").returns("SplitTraceLogger") | |
+ platform_log_file = "/tmp/rhc/platform.log" | |
+ platform_trace_log_file = "/tmp/rhc/platform-trace.log" | |
+ # truncate the log files | |
+ [platform_log_file, platform_trace_log_file].each {|f| File.new(f, 'w')} | |
+ log_config.stubs(:get).with("PLATFORM_LOG_FILE").returns(platform_log_file) | |
+ log_config.stubs(:get).with("PLATFORM_TRACE_LOG_FILE").returns(platform_trace_log_file) | |
+ log_config.stubs(:get).with("PLATFORM_LOG_LEVEL").returns('DEBUG') | |
+ log_config.stubs(:get).with("PLATFORM_TRACE_LOG_LEVEL").returns('INFO') | |
::OpenShift::Runtime::NodeLogger.stubs(:load_config).returns(log_config) | |
@config = mock('OpenShift::Config') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment