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(
24 const std::vector<dynamic_config::KeyValue>& overrides);
25
26namespace impl {
27
28// Internal API, use functions above instead!
29const dynamic_config::DocsMap& GetDefaultDocsMap();
30
31} // namespace impl
32
33} // namespace dynamic_config
34
35USERVER_NAMESPACE_END