Commit 199fde61 authored by Wandenberg Peixoto's avatar Wandenberg Peixoto

renaming the method test_method_name which was treated as a test case

parent 7198eed2
...@@ -12,8 +12,8 @@ module BaseTestCase ...@@ -12,8 +12,8 @@ module BaseTestCase
create_dirs create_dirs
config_log_and_pid_file config_log_and_pid_file
default_configuration default_configuration
@test_config_file = "#{test_method_name}.conf" @test_config_file = "#{method_name_for_test}.conf"
config_test_name = "config_#{test_method_name}" config_test_name = "config_#{method_name_for_test}"
self.send(config_test_name) if self.respond_to?(config_test_name) self.send(config_test_name) if self.respond_to?(config_test_name)
self.create_config_file self.create_config_file
...@@ -102,9 +102,9 @@ module BaseTestCase ...@@ -102,9 +102,9 @@ module BaseTestCase
def config_log_and_pid_file def config_log_and_pid_file
@client_body_temp = File.expand_path("#{nginx_tests_tmp_dir}/client_body_temp") @client_body_temp = File.expand_path("#{nginx_tests_tmp_dir}/client_body_temp")
@pid_file = File.expand_path("#{nginx_tests_tmp_dir}/logs/nginx.pid") @pid_file = File.expand_path("#{nginx_tests_tmp_dir}/logs/nginx.pid")
@main_error_log = File.expand_path("#{nginx_tests_tmp_dir}/logs/nginx-main_error-#{test_method_name}.log") @main_error_log = File.expand_path("#{nginx_tests_tmp_dir}/logs/nginx-main_error-#{method_name_for_test}.log")
@access_log = File.expand_path("#{nginx_tests_tmp_dir}/logs/nginx-http_access-#{test_method_name}.log") @access_log = File.expand_path("#{nginx_tests_tmp_dir}/logs/nginx-http_access-#{method_name_for_test}.log")
@error_log = File.expand_path("#{nginx_tests_tmp_dir}/logs/nginx-http_error-#{test_method_name}.log") @error_log = File.expand_path("#{nginx_tests_tmp_dir}/logs/nginx-http_error-#{method_name_for_test}.log")
end end
def config_filename def config_filename
...@@ -115,7 +115,7 @@ module BaseTestCase ...@@ -115,7 +115,7 @@ module BaseTestCase
File.expand_path("#{nginx_tests_tmp_dir}/mime.types") File.expand_path("#{nginx_tests_tmp_dir}/mime.types")
end end
def test_method_name def method_name_for_test
self.respond_to?('method_name') ? self.method_name : self.__name__ self.respond_to?('method_name') ? self.method_name : self.__name__
end end
...@@ -135,6 +135,8 @@ module BaseTestCase ...@@ -135,6 +135,8 @@ module BaseTestCase
end end
def default_configuration def default_configuration
@master_process = 'off'
@daemon = 'off'
@max_reserved_memory = '10m' @max_reserved_memory = '10m'
@authorized_channels_only = 'off' @authorized_channels_only = 'off'
@broadcast_channel_max_qtd = 3 @broadcast_channel_max_qtd = 3
...@@ -185,8 +187,8 @@ module BaseTestCase ...@@ -185,8 +187,8 @@ module BaseTestCase
pid <%= @pid_file %>; pid <%= @pid_file %>;
error_log <%= @main_error_log %> debug; error_log <%= @main_error_log %> debug;
# Development Mode # Development Mode
master_process off; master_process <%=@master_process%>;
daemon off; daemon <%=@daemon%>;
worker_processes <%=nginx_workers%>; worker_processes <%=nginx_workers%>;
events { events {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment