1*a92d0e6bSJohn Wedig // Copyright 2023 Google LLC
2*a92d0e6bSJohn Wedig //
3*a92d0e6bSJohn Wedig // Licensed under the Apache License, Version 2.0 (the "License");
4*a92d0e6bSJohn Wedig // you may not use this file except in compliance with the License.
5*a92d0e6bSJohn Wedig // You may obtain a copy of the License at
6*a92d0e6bSJohn Wedig //
7*a92d0e6bSJohn Wedig //      http://www.apache.org/licenses/LICENSE-2.0
8*a92d0e6bSJohn Wedig //
9*a92d0e6bSJohn Wedig // Unless required by applicable law or agreed to in writing, software
10*a92d0e6bSJohn Wedig // distributed under the License is distributed on an "AS IS" BASIS,
11*a92d0e6bSJohn Wedig // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*a92d0e6bSJohn Wedig // See the License for the specific language governing permissions and
13*a92d0e6bSJohn Wedig // limitations under the License.
14*a92d0e6bSJohn Wedig 
15*a92d0e6bSJohn Wedig #include "commands.hpp"
16*a92d0e6bSJohn Wedig #include "handler_mock.hpp"
17*a92d0e6bSJohn Wedig #include "helper.hpp"
18*a92d0e6bSJohn Wedig #include "linux_boot_done.hpp"
19*a92d0e6bSJohn Wedig 
20*a92d0e6bSJohn Wedig #include <vector>
21*a92d0e6bSJohn Wedig 
22*a92d0e6bSJohn Wedig #include <gtest/gtest.h>
23*a92d0e6bSJohn Wedig 
24*a92d0e6bSJohn Wedig using ::testing::Return;
25*a92d0e6bSJohn Wedig 
26*a92d0e6bSJohn Wedig namespace google
27*a92d0e6bSJohn Wedig {
28*a92d0e6bSJohn Wedig namespace ipmi
29*a92d0e6bSJohn Wedig {
30*a92d0e6bSJohn Wedig 
TEST(LinuxBootDoneCommandTest,ValidResponseTest)31*a92d0e6bSJohn Wedig TEST(LinuxBootDoneCommandTest, ValidResponseTest)
32*a92d0e6bSJohn Wedig {
33*a92d0e6bSJohn Wedig     std::vector<std::uint8_t> request = {};
34*a92d0e6bSJohn Wedig 
35*a92d0e6bSJohn Wedig     HandlerMock hMock;
36*a92d0e6bSJohn Wedig     EXPECT_CALL(hMock, linuxBootDone()).Times(1);
37*a92d0e6bSJohn Wedig 
38*a92d0e6bSJohn Wedig     auto reply = linuxBootDone(request, &hMock);
39*a92d0e6bSJohn Wedig     auto result = ValidateReply(reply, false);
40*a92d0e6bSJohn Wedig     auto& data = result.second;
41*a92d0e6bSJohn Wedig 
42*a92d0e6bSJohn Wedig     EXPECT_EQ(0, data.size());
43*a92d0e6bSJohn Wedig     EXPECT_EQ(SysOEMCommands::SysLinuxBootDone, result.first);
44*a92d0e6bSJohn Wedig }
45*a92d0e6bSJohn Wedig 
46*a92d0e6bSJohn Wedig } // namespace ipmi
47*a92d0e6bSJohn Wedig } // namespace google
48