Skip to content

Commit

Permalink
Merge pull request #1737 from twobraids/configman1114
Browse files Browse the repository at this point in the history
fixes Bug 949539 (v71) - changed to configman 1.1.15
  • Loading branch information
twobraids committed Dec 19, 2013
2 parents 0180cc9 + 5985229 commit 122b959
Show file tree
Hide file tree
Showing 24 changed files with 104 additions and 46 deletions.
4 changes: 2 additions & 2 deletions requirements/prod.txt
@@ -1,5 +1,5 @@
# sha256: sVa-wgD9NyieZIiXTeBQcqkQPs9tkQ_dN3IsHaM2vHU
configman==1.1.12
# sha256: WlJmfb-DmZS_IHA8aMM0jsRDchM2FtLoome-36unEEQ
configman==1.1.14
# sha256: UV_5I0YlkugyHfi0jEfjQo-NQG7iK43ne--WnRrxEXE
configobj==4.7.2
# sha256: oz42dZy6Gowxw8AelDtO4gRgTW_xPdooH484k7I5EOY
Expand Down
3 changes: 2 additions & 1 deletion socorro/unittest/cron/base.py
Expand Up @@ -85,7 +85,8 @@ def _setup_config_manager(self, jobs_string, extra_value_source=None):
],
values_source_list=value_source,
app_name='crontabber',
app_description=__doc__
app_description=__doc__,
argv_source=[]
)
return config_manager

Expand Down
9 changes: 6 additions & 3 deletions socorro/unittest/cron/jobs/test_automatic_emails.py
Expand Up @@ -27,7 +27,8 @@ def _setup_simple_config(self, domains=None):
[conf],
values_source_list=[{
'common_email_domains': domains,
}]
}],
argv_source=[]
)

def test_correct_email(self):
Expand Down Expand Up @@ -338,7 +339,8 @@ def _setup_simple_config(self, common_email_domains=None):
values_source_list['common_email_domains'] = common_email_domains
return ConfigurationManager(
[conf],
values_source_list=[values_source_list]
values_source_list=[values_source_list],
argv_source=[]
)

def _setup_test_mode_config(self):
Expand All @@ -354,7 +356,8 @@ def _setup_test_mode_config(self):
'restrict_products': ['WaterWolf'],
'test_mode': True,
'email_template': 'socorro_dev_test'
}]
}],
argv_source=[]
)

@mock.patch('socorro.external.exacttarget.exacttarget.ExactTarget')
Expand Down
3 changes: 2 additions & 1 deletion socorro/unittest/cron/jobs/test_cleanup_radix.py
Expand Up @@ -48,7 +48,8 @@ def _setup_radix_storage(self):
'logger': mock_logging,
'minute_slice_interval': 1,
'fs_root': self.temp_fs_root
}]
}],
argv_source=[]
)
return config_manager

Expand Down
1 change: 1 addition & 0 deletions socorro/unittest/cron/test_crontabber.py
Expand Up @@ -138,6 +138,7 @@ def setUp(self):
],
values_source_list=[DSN],
app_name='crontabber',
argv_source=[]
)

with config_manager.context() as config:
Expand Down
6 changes: 6 additions & 0 deletions socorro/unittest/database/test_transaction_executor.py
Expand Up @@ -96,6 +96,7 @@ def test_basic_usage_with_postgres(self):
app_version='1.0',
app_description='app description',
values_source_list=[],
argv_source=[]
)
with config_manager.context() as config:
mocked_context = config.database_class(config)
Expand Down Expand Up @@ -134,6 +135,7 @@ def test_rollback_transaction_exceptions_with_postgres(self):
app_version='1.0',
app_description='app description',
values_source_list=[],
argv_source=[]
)
with config_manager.context() as config:
mocked_context = config.database_class(config)
Expand Down Expand Up @@ -172,6 +174,7 @@ def test_basic_usage_with_postgres_with_backoff(self):
app_version='1.0',
app_description='app description',
values_source_list=[],
argv_source=[]
)
with config_manager.context() as config:
mocked_context = config.database_class(config)
Expand Down Expand Up @@ -211,6 +214,7 @@ def test_operation_error_with_postgres_with_backoff(self):
app_version='1.0',
app_description='app description',
values_source_list=[{'backoff_delays': [2, 4, 6, 10, 15]}],
argv_source=[]
)
with config_manager.context() as config:
mocked_context = config.database_class(config)
Expand Down Expand Up @@ -271,6 +275,7 @@ def test_operation_error_with_postgres_with_backoff_with_rollback(self):
app_version='1.0',
app_description='app description',
values_source_list=[{'backoff_delays': [2, 4, 6, 10, 15]}],
argv_source=[]
)
with config_manager.context() as config:
mocked_context = config.database_class(config)
Expand Down Expand Up @@ -332,6 +337,7 @@ def test_programming_error_with_postgres_with_backoff_with_rollback(self):
app_version='1.0',
app_description='app description',
values_source_list=[{'backoff_delays': [2, 4, 6, 10, 15]}],
argv_source=[]
)
with config_manager.context() as config:
mocked_context = config.database_class(config)
Expand Down
15 changes: 10 additions & 5 deletions socorro/unittest/external/elasticsearch/test_crashstorage.py
Expand Up @@ -89,7 +89,8 @@ def test_indexing(self, pyes_mock):
values_source_list=[{
'logger': mock_logging,
'elasticsearch_urls': 'http://elasticsearch_host:9200',
}]
}],
argv_source=[]
)

with config_manager.context() as config:
Expand Down Expand Up @@ -131,7 +132,8 @@ def test_success(self, pyes_mock):
values_source_list=[{
'logger': mock_logging,
'elasticsearch_urls': 'http://elasticsearch_host:9200',
}]
}],
argv_source=[]
)

with config_manager.context() as config:
Expand Down Expand Up @@ -183,7 +185,8 @@ def test_failure_no_retry(self, pyes_mock):
values_source_list=[{
'logger': mock_logging,
'elasticsearch_urls': 'http://elasticsearch_host:9200',
}]
}],
argv_source=[]
)

with config_manager.context() as config:
Expand Down Expand Up @@ -245,7 +248,8 @@ def test_failure_limited_retry(self, pyes_mock):
'backoff_delays': [0, 0, 0],
'transaction_executor_class':
TransactionExecutorWithLimitedBackoff
}]
}],
argv_source=[]
)

with config_manager.context() as config:
Expand Down Expand Up @@ -307,7 +311,8 @@ def test_success_after_limited_retry(self, pyes_mock):
'backoff_delays': [0, 0, 0],
'transaction_executor_class':
TransactionExecutorWithLimitedBackoff
}]
}],
argv_source=[]
)

with config_manager.context() as config:
Expand Down
3 changes: 2 additions & 1 deletion socorro/unittest/external/elasticsearch/test_search.py
Expand Up @@ -334,7 +334,8 @@ def get_config_manager(self):
'elasticsearch_index': webapi.elasticsearch_index,
'elasticsearch_urls': webapi.elasticsearch_urls,
'backoff_delays': [1, 2],
}]
}],
argv_source=[]
)

return config_manager
Expand Down
3 changes: 2 additions & 1 deletion socorro/unittest/external/elasticsearch/test_supersearch.py
Expand Up @@ -62,7 +62,8 @@ def _get_config_manager(config, es_index=None):
'elasticsearch_index': es_index,
'elasticsearch_urls': elasticsearch_url,
'backoff_delays': [1, 2],
}]
}],
argv_source=[]
)

return config_manager
Expand Down
3 changes: 2 additions & 1 deletion socorro/unittest/external/elasticsearch/unittestbase.py
Expand Up @@ -99,7 +99,8 @@ def get_standard_config(self):
config_manager = ConfigurationManager(
[self.required_config],
app_name='ElasticSearchTestCase',
app_description=__doc__
app_description=__doc__,
argv_source=[]
)

with config_manager.context() as config:
Expand Down
3 changes: 2 additions & 1 deletion socorro/unittest/external/filesystem/test_crash_data.py
Expand Up @@ -75,7 +75,8 @@ def _common_config_setup(self):
'std_fs_root': self.std_tmp_dir,
'def_fs_root': self.def_tmp_dir,
'pro_fs_root': self.pro_tmp_dir,
}}]
}}],
argv_source=[]
)
return config_manager

Expand Down
3 changes: 2 additions & 1 deletion socorro/unittest/external/filesystem/test_crashstorage.py
Expand Up @@ -58,7 +58,8 @@ def _common_config_setup(self):
'std_fs_root': self.std_tmp_dir,
'def_fs_root': self.def_tmp_dir,
'pro_fs_root': self.pro_tmp_dir,
}]
}],
argv_source=[]
)
return config_manager

Expand Down
3 changes: 2 additions & 1 deletion socorro/unittest/external/fs/test_fsdatedradixtreestorage.py
Expand Up @@ -31,7 +31,8 @@ def _common_config_setup(self):
values_source_list=[{
'logger': mock_logging,
'minute_slice_interval': 1
}]
}],
argv_source=[]
)
return config_manager

Expand Down
Expand Up @@ -31,7 +31,8 @@ def _common_config_setup(self):
values_source_list=[{
'logger': mock_logging,
'minute_slice_interval': 1
}]
}],
argv_source=[]
)
return config_manager

Expand Down
3 changes: 2 additions & 1 deletion socorro/unittest/external/fs/test_fsradixtreestorage.py
Expand Up @@ -31,7 +31,8 @@ def _common_config_setup(self):
app_description='app description',
values_source_list=[{
'logger': mock_logging
}]
}],
argv_source=[]
)
return config_manager

Expand Down
3 changes: 2 additions & 1 deletion socorro/unittest/external/hbase/test_crash_data.py
Expand Up @@ -100,7 +100,8 @@ def _common_config_setup(self):
app_description='app description',
values_source_list=[{'hbase': {
'logger': mock_logging
}}]
}}],
argv_source=[]
)
return config_manager

Expand Down
9 changes: 6 additions & 3 deletions socorro/unittest/external/hbase/test_crashstorage.py
Expand Up @@ -91,7 +91,8 @@ def test_basic_hbase_crashstorage(self):
'hbase_timeout': 100,
'hbase_host': commonconfig.hbaseHost.default,
'hbase_port': commonconfig.hbasePort.default,
}]
}],
argv_source=[]
)
with config_manager.context() as config:
crashstorage = HBaseCrashStorage(config)
Expand Down Expand Up @@ -176,7 +177,8 @@ def test_hbase_crashstorage_basic_error(self):
'hbase_timeout': 100,
'hbase_host': commonconfig.hbaseHost.default,
'hbase_port': commonconfig.hbasePort.default,
}]
}],
argv_source=[]
)

with config_manager.context() as config:
Expand Down Expand Up @@ -312,7 +314,8 @@ def test_hbase_crashstorage_puts_and_gets(self):
'transaction_executor_class':
TransactionExecutorWithLimitedBackoff,
'backoff_delays': [0, 0, 0],
}]
}],
argv_source=[]
)

with config_manager.context() as config:
Expand Down
21 changes: 14 additions & 7 deletions socorro/unittest/external/postgresql/test_crashstorage.py
Expand Up @@ -93,7 +93,8 @@ def _setup_config_manager(self, extra_value_source=None):
app_description='app description',
values_source_list=[{
'logger': mock_logging,
}, extra_value_source]
}, extra_value_source],
argv_source=[]
)

return config_manager
Expand Down Expand Up @@ -246,7 +247,8 @@ def test_basic_postgres_save_raw_crash(self):
values_source_list=[{
'logger': mock_logging,
'database_class': mock_postgres
}]
}],
argv_source=[]
)

with config_manager.context() as config:
Expand Down Expand Up @@ -305,7 +307,8 @@ def test_basic_key_error_on_save_processed(self):
values_source_list=[{
'logger': mock_logging,
'database_class': mock_postgres
}]
}],
argv_source=[]
)

with config_manager.context() as config:
Expand Down Expand Up @@ -340,7 +343,8 @@ def test_basic_postgres_save_processed_success(self):
values_source_list=[{
'logger': mock_logging,
'database_class': mock_postgres
}]
}],
argv_source=[]
)

with config_manager.context() as config:
Expand Down Expand Up @@ -398,7 +402,8 @@ def test_basic_postgres_save_processed_success2(self):
values_source_list=[{
'logger': mock_logging,
'database_class': mock_postgres
}]
}],
argv_source=[]
)

with config_manager.context() as config:
Expand Down Expand Up @@ -459,7 +464,8 @@ def test_basic_postgres_save_processed_operational_error(self):
'transaction_executor_class':
TransactionExecutorWithLimitedBackoff,
'backoff_delays': [0, 0, 0],
}]
}],
argv_source=[]
)

with config_manager.context() as config:
Expand Down Expand Up @@ -503,7 +509,8 @@ def test_basic_postgres_save_processed_succeed_after_failures(self):
'transaction_executor_class':
TransactionExecutorWithLimitedBackoff,
'backoff_delays': [0, 0, 0],
}]
}],
argv_source=[]
)

with config_manager.context() as config:
Expand Down
3 changes: 2 additions & 1 deletion socorro/unittest/external/postgresql/test_setupdb_app.py
Expand Up @@ -85,7 +85,8 @@ def _setup_config_manager(self, extra_value_source=None):
app_description=__doc__,
values_source_list=[{
'logger': mock_logging,
}, extra_value_source]
}, extra_value_source],
argv_source=[]
)
return config_manager

Expand Down
3 changes: 2 additions & 1 deletion socorro/unittest/external/postgresql/unittestbase.py
Expand Up @@ -103,7 +103,8 @@ def get_standard_config(self):
[self.required_config,
],
app_name='PostgreSQLTestCase',
app_description=__doc__
app_description=__doc__,
argv_source=[]
)

with config_manager.context() as config:
Expand Down

0 comments on commit 122b959

Please sign in to comment.