Commit 047d1ba3 authored by Joel Hockey's avatar Joel Hockey Committed by Commit Bot

Track calls to GetContainerSshKeys in FakeConciergeClient.

This will be used in a followup CL for CrostiniManager unit tests.

Bug: 846917
Change-Id: I4938a4bf75b986adb4a2dc283ffac7d0509e1c5c
Reviewed-on: https://chromium-review.googlesource.com/1158319Reviewed-by: default avatarRyo Hashimoto <hashimoto@chromium.org>
Commit-Queue: Joel Hockey <joelhockey@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580068}
parent 703b82a6
......@@ -94,6 +94,8 @@ void FakeConciergeClient::GetContainerSshKeys(
const vm_tools::concierge::ContainerSshKeysRequest& request,
DBusMethodCallback<vm_tools::concierge::ContainerSshKeysResponse>
callback) {
get_container_ssh_keys_called_ = true;
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::BindOnce(std::move(callback), container_ssh_keys_response_));
......
......@@ -95,6 +95,10 @@ class CHROMEOS_EXPORT FakeConciergeClient : public ConciergeClient {
bool stop_vm_called() const { return stop_vm_called_; }
// Indicates whether StartContainer has been called
bool start_container_called() const { return start_container_called_; }
// Indicates whether GetContainerSshKeys has been called
bool get_container_ssh_keys_called() const {
return get_container_ssh_keys_called_;
}
// Set ContainerStartupFailedSignalConnected state
void set_container_startup_failed_signal_connected(bool connected) {
is_container_startup_failed_signal_connected_ = connected;
......@@ -145,6 +149,7 @@ class CHROMEOS_EXPORT FakeConciergeClient : public ConciergeClient {
bool start_termina_vm_called_ = false;
bool stop_vm_called_ = false;
bool start_container_called_ = false;
bool get_container_ssh_keys_called_ = false;
bool is_container_startup_failed_signal_connected_ = true;
vm_tools::concierge::CreateDiskImageResponse create_disk_image_response_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment