From 72d854eb5fac4ff7c5842f4e96344194e8eab6b3 Mon Sep 17 00:00:00 2001
From: ansgarz <ansgar.zwick@meissa.de>
Date: Sun, 16 Mar 2025 14:59:31 +0100
Subject: [PATCH] [skip ci] replace deprecated method test
 installFirefox_remotely

---
 .../provs/desktop/infrastructure/FirefoxKtTest.kt     | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/test/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/FirefoxKtTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/FirefoxKtTest.kt
index 88b7290..65bcceb 100644
--- a/src/test/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/FirefoxKtTest.kt
+++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/desktop/infrastructure/FirefoxKtTest.kt
@@ -3,8 +3,7 @@ package org.domaindrivenarchitecture.provs.desktop.infrastructure
 import org.domaindrivenarchitecture.provs.framework.core.remote
 import org.domaindrivenarchitecture.provs.framework.ubuntu.filesystem.base.deleteFile
 import org.domaindrivenarchitecture.provs.framework.ubuntu.filesystem.base.fileContainsText
-import org.domaindrivenarchitecture.provs.framework.ubuntu.install.base.checkPackageInstalled
-import org.domaindrivenarchitecture.provs.framework.ubuntu.install.base.isPackageInstalled
+import org.domaindrivenarchitecture.provs.framework.ubuntu.install.base.checkPackage
 import org.domaindrivenarchitecture.provs.framework.ubuntu.secret.secretSources.PromptSecretSource
 import org.domaindrivenarchitecture.provs.test.defaultTestContainer
 import org.domaindrivenarchitecture.provs.test.tags.ExtensiveContainerTest
@@ -34,7 +33,7 @@ internal class FirefoxKtTest {
         assertTrue(result.success)
         assertEquals("Firefox already installed with ppa", result2.out)
 
-        assertTrue(prov.isPackageInstalled("firefox"))
+        assertTrue(prov.checkPackage("firefox"))
         assertTrue(
             prov.fileContainsText(
                 "/etc/apt/apt.conf.d/51unattended-upgrades-firefox",
@@ -69,7 +68,11 @@ internal class FirefoxKtTest {
         ).session {
             installPpaFirefox()
             firefoxVersion = cmd("apt list firefox --installed").out ?: ""
-            checkPackageInstalled("firefox")
+            if (checkPackage("firefox")) {
+                addResult(true, "Firefox installed")
+            } else {
+                addResult(false, "Firefox not installed")
+            }
         }
 
         // then