Skip to content

Commit

Permalink
Merge pull request #383 from pat-s/rhel-autodetection
Browse files Browse the repository at this point in the history
Fix RHEL platform autodetection
  • Loading branch information
gaborcsardi authored Sep 11, 2024
2 parents cd10506 + 06d0d42 commit 13e8381
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 7 deletions.
11 changes: 11 additions & 0 deletions R/sysreqs2.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@ sysreqs2_cmds <- utils::read.table(
'Red Hat Enterprise Linux' linux redhat 6 NA 'yum install -y' rpm
'Red Hat Enterprise Linux' linux redhat 7 NA 'yum install -y' rpm
'Red Hat Enterprise Linux' linux redhat * NA 'dnf install -y' rpm
'Red Hat Enterprise Linux' linux rhel 7.0 NA 'yum install -y' rpm
'Red Hat Enterprise Linux' linux rhel 7.1 NA 'yum install -y' rpm
'Red Hat Enterprise Linux' linux rhel 7.2 NA 'yum install -y' rpm
'Red Hat Enterprise Linux' linux rhel 7.3 NA 'yum install -y' rpm
'Red Hat Enterprise Linux' linux rhel 7.4 NA 'yum install -y' rpm
'Red Hat Enterprise Linux' linux rhel 7.5 NA 'yum install -y' rpm
'Red Hat Enterprise Linux' linux rhel 7.6 NA 'yum install -y' rpm
'Red Hat Enterprise Linux' linux rhel 7.7 NA 'yum install -y' rpm
'Red Hat Enterprise Linux' linux rhel 7.8 NA 'yum install -y' rpm
'Red Hat Enterprise Linux' linux rhel 7.9 NA 'yum install -y' rpm
'Red Hat Enterprise Linux' linux rhel * NA 'dnf install -y' rpm
'Fedora Linux' linux fedora * NA 'dnf install -y' rpm
'openSUSE Linux' linux opensuse * NA 'zypper --non-interactive install' rpm
'SUSE Linux Enterprise' linux sle * NA 'zypper --non-interactive install' rpm
Expand Down
23 changes: 17 additions & 6 deletions tests/testthat/_snaps/sysreqs.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# sysreqs_platforms

Code
sysreqs_platforms()
print(sysreqs_platforms(), n = Inf)
Output
# A data frame: 11 x 7
# A data frame: 22 x 7
name os distribution version update_command install_command query_command
<chr> <chr> <chr> <chr> <chr> <chr> <chr>
1 Ubun~ linux ubuntu * apt-get -y up~ apt-get -y ins~ dpkg-query
Expand All @@ -13,10 +13,21 @@
5 Red ~ linux redhat 6 <NA> yum install -y rpm
6 Red ~ linux redhat 7 <NA> yum install -y rpm
7 Red ~ linux redhat * <NA> dnf install -y rpm
8 Fedo~ linux fedora * <NA> dnf install -y rpm
9 open~ linux opensuse * <NA> zypper --non-i~ rpm
10 SUSE~ linux sle * <NA> zypper --non-i~ rpm
11 Alpi~ linux alpine * <NA> apk add --no-c~ apk
8 Red ~ linux rhel 7.0 <NA> yum install -y rpm
9 Red ~ linux rhel 7.1 <NA> yum install -y rpm
10 Red ~ linux rhel 7.2 <NA> yum install -y rpm
11 Red ~ linux rhel 7.3 <NA> yum install -y rpm
12 Red ~ linux rhel 7.4 <NA> yum install -y rpm
13 Red ~ linux rhel 7.5 <NA> yum install -y rpm
14 Red ~ linux rhel 7.6 <NA> yum install -y rpm
15 Red ~ linux rhel 7.7 <NA> yum install -y rpm
16 Red ~ linux rhel 7.8 <NA> yum install -y rpm
17 Red ~ linux rhel 7.9 <NA> yum install -y rpm
18 Red ~ linux rhel * <NA> dnf install -y rpm
19 Fedo~ linux fedora * <NA> dnf install -y rpm
20 open~ linux opensuse * <NA> zypper --non-i~ rpm
21 SUSE~ linux sle * <NA> zypper --non-i~ rpm
22 Alpi~ linux alpine * <NA> apk add --no-c~ apk

# sysreqs_db_list

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-sysreqs.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

test_that("sysreqs_platforms", {
expect_snapshot(sysreqs_platforms())
expect_snapshot(print(sysreqs_platforms(), n = Inf))
})

test_that("sysreqs_db_list", {
Expand Down

0 comments on commit 13e8381

Please sign in to comment.