forked from canonical/multipass
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmock_sftp_client.h
36 lines (32 loc) · 1.36 KB
/
mock_sftp_client.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
* Copyright (C) Canonical, Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef MOCK_SFTP_CLIENT_H
#define MOCK_SFTP_CLIENT_H
#include "common.h"
#include <multipass/ssh/sftp_client.h>
namespace multipass::test
{
struct MockSFTPClient : public SFTPClient
{
MOCK_METHOD(bool, is_remote_dir, (const fs::path& path), (override));
MOCK_METHOD(bool, push, (const fs::path& source_path, const fs::path& target_path, Flags flags), (override));
MOCK_METHOD(bool, pull, (const fs::path& source_path, const fs::path& target_path, Flags flags), (override));
MOCK_METHOD(void, from_cin, (std::istream & cin, const fs::path& target_path, bool make_parent), (override));
MOCK_METHOD(void, to_cout, (const fs::path& source_path, std::ostream& cout), (override));
};
} // namespace multipass::test
#endif // MOCK_SFTP_CLIENT_H