Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

fixes Bug 854529 - renamed option to a standard name #1153

Merged
merged 1 commit into from

3 participants

@twobraids
Owner

the configman apps should use standard naming for options of similar use. All but the registrar_client file use 'database_class' for the name of the database class. This PR changes the resistrar_client to use the standard name.

@AdrianGaudebert

Not tested, but the code looks good to me, and the change doesn't look too risky. Is this file used in stage/production yet?

@lauraxt lauraxt merged commit 7b48310 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 25, 2013
  1. @twobraids
This page is out of date. Refresh to see the latest.
View
4 config/processor.ini-dist
@@ -402,10 +402,10 @@
# converter: configman.converters.timedelta_converter
check_in_frequency='00:00:01:00'
- # name: database
+ # name: database_class
# doc: the class of the registrar's database
# converter: configman.converters.class_converter
- database='socorro.external.postgresql.connection_context.ConnectionContext'
+ database_class='socorro.external.postgresql.connection_context.ConnectionContext'
# name: database_host
# doc: the hostname of the database
View
4 socorro/processor/registration_client.py
@@ -29,7 +29,7 @@ class RegistrationError(Exception):
class ProcessorAppRegistrationClient(RequiredConfig):
required_config = Namespace()
required_config.add_option(
- 'database',
+ 'database_class',
doc="the class of the registrar's database",
default=ConnectionContext,
from_string_converter=class_converter
@@ -65,7 +65,7 @@ def __init__(self, config, quit_check_callback=None):
logger - a logger object"""
self.config = config
- self.database = config.database(config)
+ self.database = config.database_class(config)
self.transaction = config.transaction_executor_class(
config,
self.database,
View
18 socorro/unittest/processor/test_registration_client.py
@@ -45,7 +45,7 @@ def test_basic_setup(self):
app_description='app description',
values_source_list=[{
'logger': mock_logging,
- 'database': mock_postgres
+ 'database_class': mock_postgres
}]
)
m_registration = mock.Mock()
@@ -74,7 +74,7 @@ def test_checkin_done(self):
app_description='app description',
values_source_list=[{
'logger': mock_logging,
- 'database': mock_postgres
+ 'database_class': mock_postgres
}]
)
m_registration = mock.Mock()
@@ -125,7 +125,7 @@ def test_checkin_not_necessary(self):
app_description='app description',
values_source_list=[{
'logger': mock_logging,
- 'database': mock_postgres
+ 'database_class': mock_postgres
}]
)
m_registration = mock.Mock()
@@ -173,7 +173,7 @@ def test_requested_processor_id(self):
app_description='app description',
values_source_list=[{
'logger': mock_logging,
- 'database': mock_postgres
+ 'database_class': mock_postgres
}]
)
m_registration = mock.Mock()
@@ -230,7 +230,7 @@ def test_select_host_mode_success(self):
app_description='app description',
values_source_list=[{
'logger': mock_logging,
- 'database': mock_postgres,
+ 'database_class': mock_postgres,
'processor_id': 'host',
}]
)
@@ -299,7 +299,7 @@ def test_select_forcehost_mode_success(self):
app_description='app description',
values_source_list=[{
'logger': mock_logging,
- 'database': mock_postgres,
+ 'database_class': mock_postgres,
'processor_id': 'forcehost',
}]
)
@@ -370,7 +370,7 @@ def test_select_host_mode_not_found_start_new(self):
app_description='app description',
values_source_list=[{
'logger': mock_logging,
- 'database': mock_postgres,
+ 'database_class': mock_postgres,
'processor_id': 'host',
}]
)
@@ -445,7 +445,7 @@ def test_select_forcehost_mode_not_found_start_new(self):
app_description='app description',
values_source_list=[{
'logger': mock_logging,
- 'database': mock_postgres,
+ 'database_class': mock_postgres,
'processor_id': 'forcehost',
}]
)
@@ -517,7 +517,7 @@ def test_select_host_mode_not_dead_fail(self):
app_description='app description',
values_source_list=[{
'logger': mock_logging,
- 'database': mock_postgres,
+ 'database_class': mock_postgres,
'processor_id': 'host',
}]
)
Something went wrong with that request. Please try again.