userver
C++ Async Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
tests_control.hpp
Go to the documentation of this file.
1
#pragma once
2
5
6
#include <memory>
7
8
#include <
userver/server/handlers/http_handler_json_base.hpp
>
9
#include <
userver/testsuite/http_testpoint_client.hpp
>
10
11
USERVER_NAMESPACE_BEGIN
12
13
namespace
testsuite::impl::actions {
14
class
BaseTestsuiteAction;
15
}
16
17
namespace
server::handlers
{
18
19
// clang-format off
20
63
64
// clang-format on
65
class
TestsControl final :
public
HttpHandlerJsonBase {
66
public
:
67
TestsControl(
const
components::ComponentConfig
& config,
const
components::ComponentContext
& component_context);
68
~TestsControl()
override
;
69
72
static
constexpr
std::string_view
kName
=
"tests-control"
;
73
74
formats::json::Value
HandleRequestJsonThrow(
75
const
http::HttpRequest
&
request
,
76
const
formats::json::Value
& request_body,
77
request::RequestContext
& context
78
)
const override
;
79
80
static
yaml_config::Schema
GetStaticConfigSchema
();
81
82
private
:
83
formats::json::Value
PerformAction(
const
std::string& action_name,
const
formats::json::Value
& request_body)
const
;
84
85
std::unique_ptr<testsuite::TestpointClientBase> testpoint_client_;
86
std::unordered_map<std::string, std::unique_ptr<testsuite::impl::actions::BaseTestsuiteAction>> actions_;
87
};
88
89
}
// namespace server::handlers
90
91
USERVER_NAMESPACE_END
userver
server
handlers
tests_control.hpp
Generated on
for userver by
Doxygen
1.17.0