Asmitha Karunanithi | eb40f08 | 2021-07-22 06:13:04 -0500 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include "config.h" |
| 4 | |
| 5 | #include "hyp_sys_config.hpp" |
| 6 | |
| 7 | #include <gmock/gmock.h> |
| 8 | |
| 9 | namespace phosphor |
| 10 | { |
| 11 | namespace network |
| 12 | { |
| 13 | |
| 14 | class MockHypSysConfig : public phosphor::network::HypSysConfig |
| 15 | { |
| 16 | public: |
Patrick Williams | c38b071 | 2022-07-22 19:26:54 -0500 | [diff] [blame] | 17 | MockHypSysConfig(sdbusplus::bus_t& bus, const std::string& objPath, |
Asmitha Karunanithi | eb40f08 | 2021-07-22 06:13:04 -0500 | [diff] [blame] | 18 | HypNetworkMgr& parent) : |
| 19 | HypSysConfig(bus, objPath, parent) |
Patrick Williams | 89d734b | 2023-05-10 07:50:25 -0500 | [diff] [blame] | 20 | {} |
Asmitha Karunanithi | eb40f08 | 2021-07-22 06:13:04 -0500 | [diff] [blame] | 21 | |
| 22 | void setHostname(std::string hn) |
| 23 | { |
| 24 | SysConfigIntf::hostName(hn); |
| 25 | manager.setBIOSTableAttr("vmi_hostname", hn, "String"); |
| 26 | } |
| 27 | |
| 28 | const std::string getHostname() |
| 29 | { |
| 30 | return SysConfigIntf::hostName(); |
| 31 | } |
| 32 | }; |
| 33 | } // namespace network |
| 34 | } // namespace phosphor |