From 7d3be1205b5c17fa11cfe4899e1b79365806544a Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Mon, 19 Aug 2024 19:04:40 +0200 Subject: [PATCH] Revert "Early finish fix" --- service/.gitignore | 2 +- web/package/agama-web-ui.changes | 5 ---- web/src/api/status.test.ts | 48 -------------------------------- web/src/api/status.ts | 4 +-- 4 files changed, 3 insertions(+), 56 deletions(-) delete mode 100644 web/src/api/status.test.ts diff --git a/service/.gitignore b/service/.gitignore index 9372acfab2..3d17f348a7 100644 --- a/service/.gitignore +++ b/service/.gitignore @@ -49,7 +49,7 @@ build-iPhoneSimulator/ # for a library or gem, you might want to ignore these files since the code is # intended to run in multiple environments; otherwise, check them in: # Gemfile.lock -.ruby-version +# .ruby-version # .ruby-gemset # unless supporting rvm < 1.11.0 or doing something fancy, ignore this: diff --git a/web/package/agama-web-ui.changes b/web/package/agama-web-ui.changes index 1b61dbe557..3f0b2a424d 100644 --- a/web/package/agama-web-ui.changes +++ b/web/package/agama-web-ui.changes @@ -1,8 +1,3 @@ -------------------------------------------------------------------- -Mon Aug 19 11:54:07 UTC 2024 - Josef Reidinger - -- Fix early finish of installation (gh#openSUSE/agama#1544) - ------------------------------------------------------------------- Tue Aug 13 14:57:21 UTC 2024 - David Diaz diff --git a/web/src/api/status.test.ts b/web/src/api/status.test.ts deleted file mode 100644 index e27a084a6f..0000000000 --- a/web/src/api/status.test.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) [2024] SUSE LLC - * - * All Rights Reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as published - * by the Free Software Foundation. - * - * 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, contact SUSE LLC. - * - * To contact SUSE LLC about this file by physical or electronic mail, you may - * find current contact information at www.suse.com. - */ - -// @ts-check - -import { get } from "./http"; -import { fetchInstallerStatus } from "./status"; - -const mockGetFn = jest.fn().mockImplementation(() => { - return { - phase: 2, - busy: [], - iguana: false, - canInstall: false - }; -}); - -jest.mock("./http", () => { - return { - // TODO: fix mocking of get. How to do it for api tests? - // get: mockGetFn, - }; -}); - -describe("#fetchInstallerStatus", () => { - it.skip("parses response from manager/installer", async() => { - const response = await fetchInstallerStatus(); - expect(response.isBusy).toEqual(false); - }); -}); \ No newline at end of file diff --git a/web/src/api/status.ts b/web/src/api/status.ts index 3d4ae4bbc4..ecef91dad9 100644 --- a/web/src/api/status.ts +++ b/web/src/api/status.ts @@ -26,8 +26,8 @@ import { InstallerStatus } from "~/types/status"; * Returns the installer status information */ const fetchInstallerStatus = async (): Promise => { - const { phase, busy, iguana, canInstall } = await get("/api/manager/installer"); - return { phase, isBusy: busy.length !== 0, useIguana: iguana, canInstall }; + const { phase, isBusy, useIguana, canInstall } = await get("/api/manager/installer"); + return { phase, isBusy, useIguana, canInstall }; }; export { fetchInstallerStatus };