Skip to content

Commit f39a209

Browse files
authored
Update the tests for openSUSE (#6045)
Test newer releases Signed-off-by: Tim Smith <tsmith84@gmail.com>
1 parent 486771b commit f39a209

File tree

3 files changed

+22
-15
lines changed

3 files changed

+22
-15
lines changed

providers/os/detector/detector_platform_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -437,8 +437,8 @@ func TestOpenSuseLeap15Detector(t *testing.T) {
437437
assert.Nil(t, err, "was able to create the provider")
438438

439439
assert.Equal(t, "opensuse-leap", di.Name, "os name should be identified")
440-
assert.Equal(t, "openSUSE Leap 15.0", di.Title, "os title should be identified")
441-
assert.Equal(t, "15.0", di.Version, "os version should be identified")
440+
assert.Equal(t, "openSUSE Leap 15.6", di.Title, "os title should be identified")
441+
assert.Equal(t, "15.6", di.Version, "os version should be identified")
442442
assert.Equal(t, "x86_64", di.Arch, "os arch should be identified")
443443
assert.Equal(t, []string{"suse", "linux", "unix", "os"}, di.Family)
444444
}
@@ -449,7 +449,7 @@ func TestOpenSuseTumbleweedDetector(t *testing.T) {
449449

450450
assert.Equal(t, "opensuse-tumbleweed", di.Name, "os name should be identified")
451451
assert.Equal(t, "openSUSE Tumbleweed", di.Title, "os title should be identified")
452-
assert.Equal(t, "20200305", di.Version, "os version should be identified")
452+
assert.Equal(t, "20251007", di.Version, "os version should be identified")
453453
assert.Equal(t, "x86_64", di.Arch, "os arch should be identified")
454454
assert.Equal(t, []string{"suse", "linux", "unix", "os"}, di.Family)
455455
}

providers/os/detector/testdata/detect-opensuse-leap-15.toml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@ stdout = "4.9.125-linuxkit"
1010
[files."/etc/os-release"]
1111
content = """
1212
NAME="openSUSE Leap"
13-
VERSION="15.0"
13+
VERSION="15.6"
1414
ID="opensuse-leap"
1515
ID_LIKE="suse opensuse"
16-
VERSION_ID="15.0"
17-
PRETTY_NAME="openSUSE Leap 15.0"
16+
VERSION_ID="15.6"
17+
PRETTY_NAME="openSUSE Leap 15.6"
1818
ANSI_COLOR="0;32"
19-
CPE_NAME="cpe:/o:opensuse:leap:15.0"
19+
CPE_NAME="cpe:/o:opensuse:leap:15.6"
2020
BUG_REPORT_URL="https://bugs.opensuse.org"
2121
HOME_URL="https://www.opensuse.org/"
22-
"""
22+
DOCUMENTATION_URL="https://en.opensuse.org/Portal:Leap"
23+
LOGO="distributor-logo-Leap"
24+
"""

providers/os/detector/testdata/detect-opensuse-tumbleweed.toml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,19 @@ stdout = "4.9.125-linuxkit"
1010
[files."/etc/os-release"]
1111
content = """
1212
NAME="openSUSE Tumbleweed"
13-
# VERSION="20200305"
13+
# VERSION="20251007"
1414
ID="opensuse-tumbleweed"
1515
ID_LIKE="opensuse suse"
16-
VERSION_ID="20200305"
16+
VERSION_ID="20251007"
1717
PRETTY_NAME="openSUSE Tumbleweed"
1818
ANSI_COLOR="0;32"
19-
CPE_NAME="cpe:/o:opensuse:tumbleweed:20200305"
20-
BUG_REPORT_URL="https://bugs.opensuse.org"
21-
HOME_URL="https://www.opensuse.org/"
22-
LOGO="distributor-logo"
23-
"""
19+
# CPE 2.3 format, boo#1217921
20+
CPE_NAME="cpe:2.3:o:opensuse:tumbleweed:20251007:*:*:*:*:*:*:*"
21+
#CPE 2.2 format
22+
#CPE_NAME="cpe:/o:opensuse:tumbleweed:20251007"
23+
BUG_REPORT_URL="https://bugzilla.opensuse.org"
24+
SUPPORT_URL="https://bugs.opensuse.org"
25+
HOME_URL="https://www.opensuse.org"
26+
DOCUMENTATION_URL="https://en.opensuse.org/Portal:Tumbleweed"
27+
LOGO="distributor-logo-Tumbleweed"
28+
"""

0 commit comments

Comments
 (0)