Commit 115f95a9 authored by David Munro's avatar David Munro Committed by Commit Bot

crostini: Ignore DLC errors during uninstall

If DLC service isn't running we fail to uninstall DLC, however since DLC
is only rolled out to a subset of boards, on boards without we can no
longer successfully uninstall Crostini. Since we haven't started using
DLC yet ignore DLC errors as a workaround we can merge to beta while
working on a real fix.

Bug: chromium:1121463
Test: Deploy, an uninstall that failed before now works
Change-Id: Ibbe2c473bb7b7737ef2889ade971f9dd358ba227
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2416472
Commit-Queue: David Munro <davidmunro@google.com>
Auto-Submit: David Munro <davidmunro@google.com>
Reviewed-by: default avatarFergus Dall <sidereal@google.com>
Cr-Commit-Position: refs/heads/master@{#808777}
parent 6c4a9f1c
......@@ -301,13 +301,10 @@ void TerminaInstaller::RemoveDlc(base::OnceCallback<void()> callback,
void TerminaInstaller::OnUninstallFinished(
base::OnceCallback<void(bool)> callback,
std::vector<UninstallResult> partial_results) {
for (auto i : partial_results) {
if (!i) {
std::move(callback).Run(false);
return;
}
}
std::move(callback).Run(true);
// TODO(crbug/1121463): dlc_result is always false on platforms without DLC
// support. Since we aren't using DLC yet ignore DLC failures until we can
// distinguish unsupported vs error.
std::move(callback).Run(partial_results[0]);
}
base::FilePath TerminaInstaller::GetInstallLocation() {
......
......@@ -172,7 +172,9 @@ TEST_F(TerminaInstallTest, UninstallWithNothingInstalled) {
run_loop_.Run();
}
TEST_F(TerminaInstallTest, UninstallWithNothingInstalledListError) {
// TODO(crbug/1121463): Disabled since we're ignoring DLC errors until this bug
// is fixed.
TEST_F(TerminaInstallTest, DISABLED_UninstallWithNothingInstalledListError) {
fake_dlc_client_->set_get_existing_dlcs_error("An error");
termina_installer_.Uninstall(
......@@ -222,7 +224,9 @@ TEST_F(TerminaInstallTest, UninstallWithDlcInstalled) {
CheckDlcNotInstalled();
}
TEST_F(TerminaInstallTest, UninstallWithDlcInstalledUninstallError) {
// TODO(crbug/1121463): Disabled since we're ignoring DLC errors until this bug
// is fixed.
TEST_F(TerminaInstallTest, DISABLED_UninstallWithDlcInstalledUninstallError) {
InjectDlc();
fake_dlc_client_->set_uninstall_error("An error");
......
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