userver: userver/dynamic_config/test_helpers.hpp Source File
Loading...
Searching...
No Matches
test_helpers.hpp
Go to the documentation of this file.
1#pragma once
2
3/// @file userver/dynamic_config/test_helpers.hpp
4/// @brief Accessors for dynamic config defaults for tests and benchmarks
5
6#include <vector>
7
8#include <userver/dynamic_config/snapshot.hpp>
9#include <userver/dynamic_config/source.hpp>
10#include <userver/dynamic_config/storage_mock.hpp>
11
12USERVER_NAMESPACE_BEGIN
13
14namespace dynamic_config {
15
16/// Get `dynamic_config::Source` with built-in defaults for all configs
17dynamic_config::Source GetDefaultSource();
18
19/// Get `dynamic_config::Snapshot` with built-in defaults for all configs
20const dynamic_config::Snapshot& GetDefaultSnapshot();
21
22/// Make `dynamic_config::StorageMock` with built-in defaults for all configs
23dynamic_config::StorageMock MakeDefaultStorage(const std::vector<dynamic_config::KeyValue>& overrides);
24
25namespace impl {
26
27// Internal API, use functions above instead!
28const dynamic_config::DocsMap& GetDefaultDocsMap();
29
30} // namespace impl
31
32} // namespace dynamic_config
33
34USERVER_NAMESPACE_END