userver: testsuite Namespace Reference
Loading...
Searching...
No Matches
testsuite Namespace Reference

Detailed Description

Testsuite integration.

Classes

class  CacheControl
 Testsuite interface for caches and cache-like components. More...
 
class  CacheResetRegistration
 RAII helper for testsuite registration. Must be kept alive to keep supporting cache resetting. More...
 
class  DumpControl
 Dumper control interface for testsuite. More...
 
class  DumperRegistrationHolder
 RAII helper for testsuite registration. More...
 
class  ExceptionsHandlingMiddleware
 
class  GrpcControl
 
class  HttpAllowedUrlsExtra
 
class  PeriodicTaskControl
 Periodic task control interface for testsuite. More...
 
class  PeriodicTaskRegistrationHolder
 RAII helper for testsuite registration. More...
 
class  PostgresControl
 
struct  RedisControl
 
class  TaskAlreadyRunning
 
class  TaskNotFound
 
class  TestpointClientBase
 Base testpoint client. Used to report TESTPOINT executions to testsuite. More...
 
class  TestpointControl
 Testpoint control interface for testsuite. More...
 
class  TestsuiteTasks
 Testsuite tasks support. More...
 

Typedefs

using ExceptionsHandlingMiddlewareFactory
 
using TestpointCallback
 

Functions

CacheControlFindCacheControl (const components::ComponentContext &context)
 
template<typename Component >
CacheResetRegistration RegisterCache (const components::ComponentConfig &config, const components::ComponentContext &context, Component *self, void(Component::*reset_method)())
 The method for registering a cache from component constructor. The returned handle must be kept alive to keep supporting cache resetting.
 
TestsuiteTasksGetTestsuiteTasks (const components::ComponentContext &component_context)
 Get reference to TestsuiteTasks instance.
 
bool AreTestpointsAvailable () noexcept
 Returns true if testpoints are available in runtime.
 

Typedef Documentation

◆ ExceptionsHandlingMiddlewareFactory

Initial value:
ExceptionsHandlingMiddleware>

Definition at line 23 of file middlewares.hpp.

◆ TestpointCallback

using testsuite::TestpointCallback
Initial value:
utils::function_ref<void(const formats::json::Value&)>

Definition at line 26 of file testpoint.hpp.

Function Documentation

◆ FindCacheControl()

CacheControl & testsuite::FindCacheControl ( const components::ComponentContext & context)

The method for acquiring testsuite::CacheControl in the component system.

See also
testsuite::RegisterCache

◆ GetTestsuiteTasks()

TestsuiteTasks & testsuite::GetTestsuiteTasks ( const components::ComponentContext & component_context)

Get reference to TestsuiteTasks instance.

Parameters
component_context
Examples
samples/testsuite-support/src/tasks.cpp.

◆ RegisterCache()

template<typename Component >
CacheResetRegistration testsuite::RegisterCache ( const components::ComponentConfig & config,
const components::ComponentContext & context,
Component * self,
void(Component::*)() reset_method )

The method for registering a cache from component constructor. The returned handle must be kept alive to keep supporting cache resetting.

Warning
The function should be called in the component's constructor after all FindComponent calls. This ensures that reset will first be called for dependencies, then for dependent components.

Definition at line 180 of file cache_control.hpp.