| #ifndef THIRD_PARTY_MILOTIC_EXTERNAL_CC_TLBMC_UTILS_COMMAND_EXECUTOR_H_ |
| #define THIRD_PARTY_MILOTIC_EXTERNAL_CC_TLBMC_UTILS_COMMAND_EXECUTOR_H_ |
| |
| #include <string> |
| |
| #include "absl/status/statusor.h" |
| |
| namespace milotic_tlbmc { |
| |
| // Abstract class for executing shell commands. |
| // This allows for swapping out the real implementation with a mock in tests. |
| class CommandExecutor { |
| public: |
| virtual ~CommandExecutor() = default; |
| |
| virtual absl::StatusOr<std::string> Execute( |
| const std::string &command) const = 0; |
| }; |
| |
| } // namespace milotic_tlbmc |
| |
| #endif // THIRD_PARTY_MILOTIC_EXTERNAL_CC_TLBMC_UTILS_COMMAND_EXECUTOR_H_ |