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

Detailed Description

Supply dynamic configs for the service in testsuite.

Classes

class  _Changelog
 
class  _ChangelogEntry
 
class  _ConfigDefaults
 
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...
 
class  InvalidDefaultsError
 Dynamic config defaults action returned invalid response. More...
 
class  Missing
 
class  RemoveKey
 
class  Updates
 

Functions

DynamicConfig dynamic_config (request, search_path, object_substitute, cache_invalidation_state, _config_service_defaults_updated, dynamic_config_changelog, _dynconfig_load_json_cached, dynconf_cache_names)
 Fixture that allows to control dynamic config values used by the service.
 
 dynconf_cache_names ()
 
 _dynconfig_json_cache ()
 
 _dynconfig_load_json_cached (json_loads, _dynconfig_json_cache)
 
DynamicConfig taxi_config (dynamic_config)
 Deprecated, use dynamic_config instead.
 
ConfigDict dynamic_config_fallback_patch ()
 Override this fixture to replace some dynamic config values specifically for testsuite tests:
 
ConfigDict config_service_defaults (config_fallback_path, dynamic_config_fallback_patch)
 Fixture that returns default values for dynamic config.
 
 _config_service_defaults_updated (config_service_defaults)
 
 userver_config_dynconf_cache (service_tmpdir)
 
 userver_config_dynconf_fallback (config_service_defaults)
 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.
 
_Changelog dynamic_config_changelog ()
 
None mock_configs_service (mockserver, DynamicConfig dynamic_config, _Changelog dynamic_config_changelog)
 Adds a mockserver handler that forwards dynamic_config to service's dynamic-config-client component.
 
 _userver_dynconfig_cache_control (_Changelog dynamic_config_changelog)
 

Variables

list USERVER_CONFIG_HOOKS
 
dict USERVER_CACHE_CONTROL_HOOKS
 
 _CONFIG_CACHES = tuple(USERVER_CACHE_CONTROL_HOOKS.keys())
 
 ConfigDict = typing.Dict[str, typing.Any]
 

Function Documentation

◆ _config_service_defaults_updated()

pytest_userver.plugins.dynamic_config._config_service_defaults_updated ( config_service_defaults)
protected

Definition at line 428 of file dynamic_config.py.

◆ _dynconfig_json_cache()

pytest_userver.plugins.dynamic_config._dynconfig_json_cache ( )
protected

Definition at line 336 of file dynamic_config.py.

◆ _dynconfig_load_json_cached()

pytest_userver.plugins.dynamic_config._dynconfig_load_json_cached ( json_loads,
_dynconfig_json_cache )
protected

Definition at line 341 of file dynamic_config.py.

◆ _userver_dynconfig_cache_control()

pytest_userver.plugins.dynamic_config._userver_dynconfig_cache_control ( _Changelog dynamic_config_changelog)
protected

Definition at line 551 of file dynamic_config.py.

◆ dynamic_config_changelog()

_Changelog pytest_userver.plugins.dynamic_config.dynamic_config_changelog ( )

Definition at line 516 of file dynamic_config.py.

◆ dynconf_cache_names()

pytest_userver.plugins.dynamic_config.dynconf_cache_names ( )

Definition at line 331 of file dynamic_config.py.

◆ taxi_config()

DynamicConfig pytest_userver.plugins.dynamic_config.taxi_config ( dynamic_config)

Deprecated, use dynamic_config instead.

Definition at line 351 of file dynamic_config.py.

◆ userver_config_dynconf_cache()

pytest_userver.plugins.dynamic_config.userver_config_dynconf_cache ( service_tmpdir)

Definition at line 433 of file dynamic_config.py.

Variable Documentation

◆ _CONFIG_CACHES

pytest_userver.plugins.dynamic_config._CONFIG_CACHES = tuple(USERVER_CACHE_CONTROL_HOOKS.keys())
protected

Definition at line 27 of file dynamic_config.py.

◆ ConfigDict

pytest_userver.plugins.dynamic_config.ConfigDict = typing.Dict[str, typing.Any]

Definition at line 42 of file dynamic_config.py.

◆ USERVER_CACHE_CONTROL_HOOKS

dict pytest_userver.plugins.dynamic_config.USERVER_CACHE_CONTROL_HOOKS
Initial value:
1= {
2 'dynamic-config-client-updater': '_userver_dynconfig_cache_control',
3}

Definition at line 23 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 18 of file dynamic_config.py.