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 = utils::function_ref<void(const formats::json::Value&)>
 

Functions

TestsuiteTasksGetTestsuiteTasks (const components::ComponentContext &component_context)
 Get reference to TestsuiteTasks instance.
 
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.
 
bool AreTestpointsAvailable () noexcept
 Returns true if testpoints are available in runtime.
 

Typedef Documentation

◆ ExceptionsHandlingMiddlewareFactory

◆ TestpointCallback

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

Definition at line 19 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 185 of file cache_control.hpp.