Coverage Report

Created: 2023-11-12 09:30

/proc/self/cwd/test/mocks/upstream/test_retry_host_predicate_factory.h
Line
Count
Source (jump to first uncovered line)
1
#pragma once
2
3
#include "envoy/upstream/retry.h"
4
5
#include "gmock/gmock.h"
6
#include "gtest/gtest.h"
7
#include "retry_host_predicate.h"
8
9
namespace Envoy {
10
namespace Upstream {
11
using ::testing::NiceMock;
12
class TestRetryHostPredicateFactory : public RetryHostPredicateFactory {
13
public:
14
0
  RetryHostPredicateSharedPtr createHostPredicate(const Protobuf::Message&, uint32_t) override {
15
0
    return std::make_shared<NiceMock<MockRetryHostPredicate>>();
16
0
  }
17
18
0
  std::string name() const override { return "envoy.test_host_predicate"; }
19
0
  ProtobufTypes::MessagePtr createEmptyConfigProto() override {
20
0
    // Using Struct instead of a custom per-filter empty config proto
21
0
    // This is only allowed in tests.
22
0
    return ProtobufTypes::MessagePtr{new Envoy::ProtobufWkt::Struct()};
23
0
  }
24
};
25
} // namespace Upstream
26
} // namespace Envoy