Github   Telegram
Loading...
Searching...
No Matches
testsuite_support.hpp
Go to the documentation of this file.
1#pragma once
2
5
10#include <userver/testsuite/http_allowed_urls_extra.hpp>
12#include <userver/testsuite/postgres_control.hpp>
13#include <userver/testsuite/redis_control.hpp>
15
16USERVER_NAMESPACE_BEGIN
17
19namespace testsuite {
20class TestsuiteTasks;
21}
22
23namespace components {
24
25// clang-format off
26
48
49// clang-format on
50
51class TestsuiteSupport final : public components::impl::ComponentBase {
52 public:
53 static constexpr std::string_view kName = "testsuite-support";
54
55 TestsuiteSupport(const components::ComponentConfig& component_config,
56 const components::ComponentContext& component_context);
57 ~TestsuiteSupport() override;
58
59 testsuite::CacheControl& GetCacheControl();
60 testsuite::ComponentControl& GetComponentControl();
61 testsuite::DumpControl& GetDumpControl();
62 testsuite::PeriodicTaskControl& GetPeriodicTaskControl();
63 testsuite::TestpointControl& GetTestpointControl();
64 const testsuite::PostgresControl& GetPostgresControl();
65 const testsuite::RedisControl& GetRedisControl();
66 testsuite::TestsuiteTasks& GetTestsuiteTasks();
67 testsuite::HttpAllowedUrlsExtra& GetHttpAllowedUrlsExtra();
68
69 static yaml_config::Schema GetStaticConfigSchema();
70
71 private:
72 void OnAllComponentsAreStopping() override;
73
74 testsuite::CacheControl cache_control_;
75 testsuite::ComponentControl component_control_;
76 testsuite::DumpControl dump_control_;
77 testsuite::PeriodicTaskControl periodic_task_control_;
78 testsuite::TestpointControl testpoint_control_;
79 testsuite::PostgresControl postgres_control_;
80 testsuite::RedisControl redis_control_;
81 std::unique_ptr<testsuite::TestsuiteTasks> testsuite_tasks_;
82 testsuite::HttpAllowedUrlsExtra http_allowed_urls_extra_;
83};
84
85template <>
86inline constexpr bool kHasValidate<TestsuiteSupport> = true;
87
88} // namespace components
89
90USERVER_NAMESPACE_END