From dc3fc04448c265e487f9dc74e597d64882bce1d3 Mon Sep 17 00:00:00 2001 From: goldyfruit Date: Tue, 30 Jul 2024 14:03:10 -0400 Subject: [PATCH] [slowroll] Add openSUSE Slowroll support --- README.md | 1 + tests/bats/packages.bats | 18 ++++++++++++++++++ utils/common.sh | 2 +- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f7c8444c..73a86227 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ Then follow the instructions display on screen. | Linux Mint | `>= 21` | | openSUSE Leap | `>= 15` | | openSUSE Tumbleweed | `rolling` | +| openSUSE Slowroll | `rolling` | | Manjaro | `rolling` | | Raspbian | `10` | | Raspberry Pi OS | `>= 11` | diff --git a/tests/bats/packages.bats b/tests/bats/packages.bats index b8c9da85..d9969de8 100644 --- a/tests/bats/packages.bats +++ b/tests/bats/packages.bats @@ -112,6 +112,15 @@ EOF assert_success } +@test "function_required_packages_opensuse_slowroll" { + DISTRO_NAME="opensuse-slowroll" + function zypper() { + exit 0 + } + run required_packages + assert_success +} + @test "function_required_packages_linuxmint" { DISTRO_NAME="linuxmint" function apt-get() { @@ -229,6 +238,15 @@ EOF assert_failure } +@test "function_required_packages_opensuse_slowroll_fail" { + DISTRO_NAME="opensuse-slowroll" + function zypper() { + exit 1 + } + run required_packages + assert_failure +} + @test "function_required_packages_linuxmint_fail" { DISTRO_NAME="linuxmint" function apt-get() { diff --git a/utils/common.sh b/utils/common.sh index 87a16b03..99bd4155 100644 --- a/utils/common.sh +++ b/utils/common.sh @@ -216,7 +216,7 @@ function required_packages() { almalinux | rocky | centos) dnf install -y python3 python3-devel python3-pip newt expect jq "${extra_packages[@]}" &>>"$LOG_FILE" ;; - opensuse-tumbleweed | opensuse-leap) + opensuse-tumbleweed | opensuse-leap | opensuse-slowroll) zypper install --no-recommends -y python3 python3-devel python3-pip python3-rpm newt expect jq "${extra_packages[@]}" &>>"$LOG_FILE" ;; arch | manjaro | endeavouros)