Krzysztof Grobelny | e6d4887 | 2022-02-08 13:41:30 +0100 | [diff] [blame] | 1 | #include "dbus_environment.hpp" |
Szymon Dompke | 1cdd7e4 | 2022-06-08 14:43:13 +0200 | [diff] [blame] | 2 | #include "helpers.hpp" |
Krzysztof Grobelny | e6d4887 | 2022-02-08 13:41:30 +0100 | [diff] [blame] | 3 | #include "messages/update_report_ind.hpp" |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 4 | #include "trigger_actions.hpp" |
Krzysztof Grobelny | e6d4887 | 2022-02-08 13:41:30 +0100 | [diff] [blame] | 5 | #include "utils/messanger.hpp" |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 6 | |
| 7 | #include <stdexcept> |
| 8 | |
Krzysztof Grobelny | e6d4887 | 2022-02-08 13:41:30 +0100 | [diff] [blame] | 9 | #include <gmock/gmock.h> |
| 10 | |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 11 | using namespace testing; |
| 12 | |
| 13 | namespace action |
| 14 | { |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 15 | namespace numeric |
| 16 | { |
Michal Orzel | 8018a3b | 2024-06-26 14:14:16 +0200 | [diff] [blame^] | 17 | using LogParam = std::tuple<::numeric::Type, double, TriggerValue>; |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 18 | |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 19 | static auto getCorrectParams() |
| 20 | { |
Michal Orzel | 8018a3b | 2024-06-26 14:14:16 +0200 | [diff] [blame^] | 21 | return Values( |
| 22 | std::make_tuple(::numeric::Type::upperCritical, 91.1, |
| 23 | TriggerValue(90.0)), |
| 24 | std::make_tuple(::numeric::Type::upperCritical, 90, TriggerValue(91.1)), |
| 25 | std::make_tuple(::numeric::Type::lowerCritical, 91.2, |
| 26 | TriggerValue(90.0)), |
| 27 | std::make_tuple(::numeric::Type::lowerCritical, 90, TriggerValue(91.2)), |
| 28 | std::make_tuple(::numeric::Type::upperWarning, 88.5, |
| 29 | TriggerValue(90.0)), |
| 30 | std::make_tuple(::numeric::Type::upperWarning, 90, TriggerValue(88.5)), |
| 31 | std::make_tuple(::numeric::Type::lowerWarning, 88.6, |
| 32 | TriggerValue(90.0)), |
| 33 | std::make_tuple(::numeric::Type::lowerWarning, 90, TriggerValue(88.6))); |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 34 | } |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 35 | |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 36 | static auto getIncorrectParams() |
| 37 | { |
Michal Orzel | 8018a3b | 2024-06-26 14:14:16 +0200 | [diff] [blame^] | 38 | return Values(std::make_tuple(::numeric::Type::upperCritical, 90.0, |
| 39 | TriggerValue(90.0)), |
| 40 | std::make_tuple(static_cast<::numeric::Type>(-1), 88.0, |
| 41 | TriggerValue(90.0)), |
| 42 | std::make_tuple(static_cast<::numeric::Type>(123), 123.0, |
| 43 | TriggerValue(90.0)), |
| 44 | std::make_tuple(::numeric::Type::upperCritical, 90.0, |
| 45 | TriggerValue("numeric"))); |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 46 | } |
| 47 | |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 48 | template <typename ActionType> |
| 49 | class TestActionNumeric : public Test, public WithParamInterface<LogParam> |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 50 | { |
| 51 | public: |
| 52 | void SetUp() override |
| 53 | { |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 54 | auto [type, threshold, value] = GetParam(); |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 55 | sut = std::make_unique<ActionType>(type, threshold); |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 56 | commmitValue = value; |
| 57 | } |
| 58 | |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 59 | void commit() |
| 60 | { |
| 61 | sut->commit("MyTrigger", std::nullopt, "MySensor", |
| 62 | Milliseconds{100'000}, commmitValue); |
| 63 | } |
| 64 | |
| 65 | std::unique_ptr<ActionType> sut; |
Michal Orzel | 8018a3b | 2024-06-26 14:14:16 +0200 | [diff] [blame^] | 66 | TriggerValue commmitValue; |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 67 | }; |
| 68 | |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 69 | class TestLogToJournalNumeric : public TestActionNumeric<LogToJournal> |
| 70 | {}; |
| 71 | |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 72 | INSTANTIATE_TEST_SUITE_P(LogToJournalNumericParams, TestLogToJournalNumeric, |
| 73 | getCorrectParams()); |
| 74 | |
| 75 | TEST_P(TestLogToJournalNumeric, commitAnActionDoesNotThrow) |
| 76 | { |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 77 | EXPECT_NO_THROW(commit()); |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 78 | } |
| 79 | |
| 80 | class TestLogToJournalNumericThrow : public TestLogToJournalNumeric |
| 81 | {}; |
| 82 | |
| 83 | INSTANTIATE_TEST_SUITE_P(_, TestLogToJournalNumericThrow, getIncorrectParams()); |
| 84 | |
| 85 | TEST_P(TestLogToJournalNumericThrow, commitAnActionExpectThrow) |
| 86 | { |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 87 | EXPECT_ANY_THROW(commit()); |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 88 | } |
| 89 | |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 90 | class TestLogToRedfishEventLogNumeric : |
| 91 | public TestActionNumeric<LogToRedfishEventLog> |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 92 | {}; |
| 93 | |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 94 | INSTANTIATE_TEST_SUITE_P(LogToRedfishEventLogNumericParams, |
| 95 | TestLogToRedfishEventLogNumeric, getCorrectParams()); |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 96 | |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 97 | TEST_P(TestLogToRedfishEventLogNumeric, commitExpectNoThrow) |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 98 | { |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 99 | EXPECT_NO_THROW(commit()); |
| 100 | } |
| 101 | |
| 102 | class TestLogToRedfishEventLogNumericThrow : |
| 103 | public TestLogToRedfishEventLogNumeric |
| 104 | {}; |
| 105 | |
| 106 | INSTANTIATE_TEST_SUITE_P(_, TestLogToRedfishEventLogNumericThrow, |
| 107 | getIncorrectParams()); |
| 108 | |
| 109 | TEST_P(TestLogToRedfishEventLogNumericThrow, commitExpectToThrow) |
| 110 | { |
| 111 | EXPECT_ANY_THROW(commit()); |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 112 | } |
| 113 | |
| 114 | } // namespace numeric |
| 115 | |
| 116 | namespace discrete |
| 117 | { |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 118 | using LogParam = std::tuple<::discrete::Severity, TriggerValue>; |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 119 | |
| 120 | static auto getCorrectParams() |
| 121 | { |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 122 | return Values( |
| 123 | std::make_tuple(::discrete::Severity::critical, |
| 124 | TriggerValue("DiscreteVal")), |
| 125 | std::make_tuple(::discrete::Severity::warning, TriggerValue("On")), |
| 126 | std::make_tuple(::discrete::Severity::ok, TriggerValue("Off"))); |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 127 | } |
| 128 | |
| 129 | static auto getIncorrectParams() |
| 130 | { |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 131 | return Values( |
| 132 | std::make_tuple(static_cast<::discrete::Severity>(-1), |
| 133 | TriggerValue("DiscreteVal42")), |
| 134 | std::make_tuple(static_cast<::discrete::Severity>(42), |
| 135 | TriggerValue("On")), |
| 136 | std::make_tuple(::discrete::Severity::critical, TriggerValue(42.0)), |
| 137 | std::make_tuple(::discrete::Severity::warning, TriggerValue(0.0)), |
| 138 | std::make_tuple(::discrete::Severity::ok, TriggerValue(0.1))); |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 139 | } |
| 140 | |
Michal Orzel | 8018a3b | 2024-06-26 14:14:16 +0200 | [diff] [blame^] | 141 | class TestLogToJournalDiscrete : |
| 142 | public Test, |
| 143 | public WithParamInterface<LogParam> |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 144 | { |
| 145 | public: |
| 146 | void SetUp() override |
| 147 | { |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 148 | auto [severity, value] = GetParam(); |
Michal Orzel | 8018a3b | 2024-06-26 14:14:16 +0200 | [diff] [blame^] | 149 | sut = std::make_unique<LogToJournal>(severity); |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 150 | commitValue = value; |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 151 | } |
| 152 | |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 153 | void commit() |
| 154 | { |
| 155 | std::string thresholdName = "MyThreshold"; |
| 156 | sut->commit("MyTrigger", std::cref(thresholdName), "MySensor", |
| 157 | Milliseconds{100'000}, commitValue); |
| 158 | } |
| 159 | |
| 160 | TriggerValue commitValue; |
Michal Orzel | 8018a3b | 2024-06-26 14:14:16 +0200 | [diff] [blame^] | 161 | std::unique_ptr<LogToJournal> sut; |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 162 | }; |
| 163 | |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 164 | INSTANTIATE_TEST_SUITE_P(LogToJournalDiscreteParams, TestLogToJournalDiscrete, |
| 165 | getCorrectParams()); |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 166 | |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 167 | TEST_P(TestLogToJournalDiscrete, commitAnActionWIthDiscreteValueDoesNotThrow) |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 168 | { |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 169 | EXPECT_NO_THROW(commit()); |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 170 | } |
| 171 | |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 172 | class TestLogToJournalDiscreteThrow : public TestLogToJournalDiscrete |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 173 | {}; |
| 174 | |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 175 | INSTANTIATE_TEST_SUITE_P(_, TestLogToJournalDiscreteThrow, |
| 176 | getIncorrectParams()); |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 177 | |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 178 | TEST_P(TestLogToJournalDiscreteThrow, commitAnActionExpectThrow) |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 179 | { |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 180 | EXPECT_ANY_THROW(commit()); |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 181 | } |
| 182 | |
Michal Orzel | 8018a3b | 2024-06-26 14:14:16 +0200 | [diff] [blame^] | 183 | class TestLogToRedfishEventLogDiscrete : public Test |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 184 | { |
Michal Orzel | 8018a3b | 2024-06-26 14:14:16 +0200 | [diff] [blame^] | 185 | public: |
| 186 | void SetUp() |
| 187 | { |
| 188 | sut = std::make_unique<LogToRedfishEventLog>(); |
| 189 | } |
| 190 | |
| 191 | void commit(TriggerValue value) |
| 192 | { |
| 193 | std::string thresholdName = "MyThreshold"; |
| 194 | sut->commit("MyTrigger", std::cref(thresholdName), "MySensor", |
| 195 | Milliseconds{100'000}, value); |
| 196 | } |
| 197 | |
| 198 | std::unique_ptr<LogToRedfishEventLog> sut; |
| 199 | }; |
| 200 | |
| 201 | TEST_F(TestLogToRedfishEventLogDiscrete, commitDiscreteValueExpectNoThrow) |
| 202 | { |
| 203 | EXPECT_NO_THROW(commit("DiscreteVal")); |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 204 | } |
| 205 | |
Michal Orzel | 8018a3b | 2024-06-26 14:14:16 +0200 | [diff] [blame^] | 206 | TEST_F(TestLogToRedfishEventLogDiscrete, commitNumericValueExpectToThrow) |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 207 | { |
Michal Orzel | 8018a3b | 2024-06-26 14:14:16 +0200 | [diff] [blame^] | 208 | EXPECT_ANY_THROW(commit(42.0)); |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 209 | } |
| 210 | |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 211 | namespace onChange |
| 212 | { |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 213 | |
| 214 | template <typename ActionType> |
| 215 | class TestActionOnChange : public Test |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 216 | { |
| 217 | public: |
| 218 | void SetUp() override |
| 219 | { |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 220 | sut = std::make_unique<ActionType>(); |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 221 | } |
| 222 | |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 223 | void commit(TriggerValue value) |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 224 | { |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 225 | sut->commit("MyTrigger", std::nullopt, "MySensor", |
| 226 | Milliseconds{100'000}, value); |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 227 | } |
| 228 | |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 229 | std::unique_ptr<ActionType> sut; |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 230 | }; |
| 231 | |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 232 | class TestLogToJournalDiscreteOnChange : public TestActionOnChange<LogToJournal> |
| 233 | {}; |
| 234 | |
| 235 | TEST_F(TestLogToJournalDiscreteOnChange, commitNumericValueExpectNoThrow) |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 236 | { |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 237 | EXPECT_NO_THROW(commit(90.0)); |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 238 | } |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 239 | |
| 240 | TEST_F(TestLogToJournalDiscreteOnChange, commitDiscreteValueExpectNoThrow) |
| 241 | { |
| 242 | EXPECT_NO_THROW(commit("Off")); |
| 243 | } |
| 244 | |
| 245 | class TestLogToRedfishEventLogDiscreteOnChange : |
| 246 | public TestActionOnChange<LogToRedfishEventLog> |
| 247 | {}; |
| 248 | |
| 249 | TEST_F(TestLogToRedfishEventLogDiscreteOnChange, |
| 250 | commitNumericValueExpectNoThrow) |
| 251 | { |
| 252 | EXPECT_NO_THROW(commit(90.0)); |
| 253 | } |
| 254 | |
| 255 | TEST_F(TestLogToRedfishEventLogDiscreteOnChange, |
| 256 | commitDiscreteValueExpectNoThrow) |
| 257 | { |
| 258 | EXPECT_NO_THROW(commit("Off")); |
| 259 | } |
| 260 | |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 261 | } // namespace onChange |
| 262 | } // namespace discrete |
| 263 | |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 264 | class TestUpdateReport : public Test |
| 265 | { |
| 266 | public: |
Patrick Williams | 3a1c297 | 2023-05-10 07:51:04 -0500 | [diff] [blame] | 267 | TestUpdateReport() : messanger(DbusEnvironment::getIoc()) {} |
Krzysztof Grobelny | e6d4887 | 2022-02-08 13:41:30 +0100 | [diff] [blame] | 268 | |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 269 | void make(std::vector<std::string> names) |
| 270 | { |
Krzysztof Grobelny | e6d4887 | 2022-02-08 13:41:30 +0100 | [diff] [blame] | 271 | messanger.on_receive<messages::UpdateReportInd>( |
| 272 | [this](const auto& msg) { updateReport.Call(msg); }); |
| 273 | |
Szymon Dompke | 94f71c5 | 2021-12-10 07:16:33 +0100 | [diff] [blame] | 274 | sut = std::make_unique<UpdateReport>( |
Krzysztof Grobelny | e6d4887 | 2022-02-08 13:41:30 +0100 | [diff] [blame] | 275 | DbusEnvironment::getIoc(), |
Szymon Dompke | 94f71c5 | 2021-12-10 07:16:33 +0100 | [diff] [blame] | 276 | std::make_shared<std::vector<std::string>>(std::move(names))); |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 277 | } |
| 278 | |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 279 | void commit(TriggerValue value) |
| 280 | { |
| 281 | sut->commit(triggerId, std::nullopt, "MySensor", Milliseconds{100'000}, |
| 282 | value); |
| 283 | } |
| 284 | |
Krzysztof Grobelny | e6d4887 | 2022-02-08 13:41:30 +0100 | [diff] [blame] | 285 | utils::Messanger messanger; |
| 286 | NiceMock<MockFunction<void(const messages::UpdateReportInd&)>> updateReport; |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 287 | std::unique_ptr<UpdateReport> sut; |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 288 | std::string triggerId = "MyTrigger"; |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 289 | }; |
| 290 | |
| 291 | TEST_F(TestUpdateReport, commitWhenReportNameIsEmptyExpectNoReportUpdate) |
| 292 | { |
Krzysztof Grobelny | e6d4887 | 2022-02-08 13:41:30 +0100 | [diff] [blame] | 293 | EXPECT_CALL(updateReport, Call(_)).Times(0); |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 294 | |
| 295 | make({}); |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 296 | commit(90.0); |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 297 | } |
| 298 | |
| 299 | TEST_F(TestUpdateReport, commitExpectReportUpdate) |
| 300 | { |
| 301 | std::vector<std::string> names = {"Report1", "Report2", "Report3"}; |
Krzysztof Grobelny | e6d4887 | 2022-02-08 13:41:30 +0100 | [diff] [blame] | 302 | EXPECT_CALL(updateReport, |
| 303 | Call(FieldsAre(UnorderedElementsAreArray(names)))); |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 304 | |
| 305 | make(names); |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 306 | commit(90.0); |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 307 | } |
| 308 | |
| 309 | } // namespace action |