userver: pytest_userver.plugins.dynamic_config Namespace Reference
Loading...
Searching...
No Matches
pytest_userver.plugins.dynamic_config Namespace Reference

Supply dynamic configs for the service in testsuite. More...

Classes

class  BaseError
 Base class for exceptions from this module. More...
 
class  DynamicConfig
 Simple dynamic config backend. More...
 
class  DynamicConfigNotFoundError
 Config parameter was not found and no default was provided. More...
 

Functions

DynamicConfig dynamic_config (request, search_path, load_json, object_substitute, config_service_defaults, cache_invalidation_state)
 Fixture that allows to control dynamic config values used by the service.
 
DynamicConfig taxi_config (dynamic_config)
 Deprecated, use dynamic_config instead.
 
typing.Dict[str, typing.Any] dynamic_config_fallback_patch ()
 Override this fixture to replace some dynamic config values specifically for testsuite tests:
 
typing.Dict[str, typing.Any] config_service_defaults (config_fallback_path, dynamic_config_fallback_patch)
 Fixture that returns default values for dynamic config.
 
 userver_config_dynconf_cache (service_tmpdir)
 
 userver_config_dynconf_fallback (pytestconfig, config_service_defaults, service_tmpdir)
 Returns a function that adjusts the static configuration file for the testsuite.
 
 userver_config_dynconf_url (mockserver_info)
 Returns a function that adjusts the static configuration file for the testsuite.
 
None mock_configs_service (mockserver, dynamic_config)
 Adds a mockserver handler that forwards dynamic_config to service's dynamic-config-client component.
 

Variables

list USERVER_CONFIG_HOOKS
 
list _CONFIG_CACHES = ['dynamic-config-client-updater']
 
dict _COMPONENTS_WITH_FALLBACK
 

Detailed Description

Supply dynamic configs for the service in testsuite.

Function Documentation

◆ taxi_config()

DynamicConfig pytest_userver.plugins.dynamic_config.taxi_config (   dynamic_config)

Deprecated, use dynamic_config instead.

Definition at line 118 of file dynamic_config.py.

◆ userver_config_dynconf_cache()

pytest_userver.plugins.dynamic_config.userver_config_dynconf_cache (   service_tmpdir)

Definition at line 174 of file dynamic_config.py.

Variable Documentation

◆ _COMPONENTS_WITH_FALLBACK

dict pytest_userver.plugins.dynamic_config._COMPONENTS_WITH_FALLBACK
protected
Initial value:
1= {
2 'dynamic-config-fallbacks',
3 'dynamic-config-client-updater',
4}

Definition at line 192 of file dynamic_config.py.

◆ _CONFIG_CACHES

list pytest_userver.plugins.dynamic_config._CONFIG_CACHES = ['dynamic-config-client-updater']
protected

Definition at line 21 of file dynamic_config.py.

◆ USERVER_CONFIG_HOOKS

list pytest_userver.plugins.dynamic_config.USERVER_CONFIG_HOOKS
Initial value:
1= [
2 'userver_config_dynconf_cache',
3 'userver_config_dynconf_fallback',
4 'userver_config_dynconf_url',
5]

Definition at line 15 of file dynamic_config.py.