mirror of
https://github.com/openappsec/openappsec.git
synced 2025-09-29 11:16:30 +03:00
Apr 27th Update
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include "i_env_details.h"
|
||||
#include "maybe_res.h"
|
||||
#include "event.h"
|
||||
#include "rest.h"
|
||||
|
||||
class ApplyPolicyEvent : public Event<ApplyPolicyEvent>
|
||||
{
|
||||
@@ -46,13 +47,15 @@ public:
|
||||
class ApplyPolicyRest : public ServerRest
|
||||
{
|
||||
public:
|
||||
// LCOV_EXCL_START Reason: no test exist
|
||||
void
|
||||
doCall() override
|
||||
{
|
||||
Singleton::Consume<I_LocalPolicyMgmtGen>::by<DeclarativePolicyUtils>()->setPolicyPath(policy_path.get());
|
||||
ApplyPolicyEvent().notify();
|
||||
}
|
||||
// LCOV_EXCL_STOP
|
||||
|
||||
private:
|
||||
C2S_PARAM(std::string, policy_path);
|
||||
};
|
||||
|
||||
void init();
|
||||
|
@@ -31,6 +31,13 @@ operator<<(std::ostream &os, const std::map<T, S> &)
|
||||
return os;
|
||||
}
|
||||
|
||||
template <typename T, typename S>
|
||||
std::ostream &
|
||||
operator<<(std::ostream &os, const Maybe<std::map<T, S>> &)
|
||||
{
|
||||
return os;
|
||||
}
|
||||
|
||||
class MockOrchestrationTools
|
||||
:
|
||||
public Singleton::Provide<I_OrchestrationTools>::From<MockProvider<I_OrchestrationTools>>
|
||||
|
@@ -26,6 +26,10 @@ class MockServiceController :
|
||||
public:
|
||||
MOCK_METHOD0(refreshPendingServices, void());
|
||||
|
||||
MOCK_METHOD0(doesFailedServicesExist, bool());
|
||||
|
||||
MOCK_METHOD0(clearFailedServices, void());
|
||||
|
||||
MOCK_CONST_METHOD0(getPolicyVersion, const std::string &());
|
||||
|
||||
MOCK_CONST_METHOD0(getUpdatePolicyVersion, const std::string &());
|
||||
|
Reference in New Issue
Block a user