Skip to content

Commit 7501cc6

Browse files
add cleanstart distro test fixtures and test cases
Signed-off-by: cleanstart-community-admin <community-admin@cleanstart.com>
1 parent 032c49f commit 7501cc6

4 files changed

Lines changed: 36 additions & 0 deletions

File tree

grype/distro/distro_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,16 @@ func Test_NewDistroFromRelease_Coverage(t *testing.T) {
481481
Type: MinimOS,
482482
Version: "20241031",
483483
},
484+
{
485+
Name: "testdata/os/cleanstart",
486+
Type: Clnstrt,
487+
Version: "3.20.3",
488+
},
489+
{
490+
Name: "testdata/os/clnstrt",
491+
Type: Clnstrt,
492+
Version: "3.20.3",
493+
},
484494
{
485495
Name: "testdata/os/raspbian",
486496
Type: Raspbian,
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
ID=cleanstart
2+
NAME="CleanStart"
3+
PRETTY_NAME="CleanStart v3.20"
4+
VERSION_ID="3.20.3"
5+
HOME_URL="https://www.cleanstart.com/"
6+
BUG_REPORT_URL="https://github.com/cleanstart-containers/cleanstart/issues"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
ID=clnstrt
2+
NAME="Clnstrt Linux"
3+
PRETTY_NAME="Clnstrt Linux v3.20"
4+
VERSION_ID="3.20.3"
5+
HOME_URL="https://clnstrt.dev"
6+
BUG_REPORT_URL="https://clnstrt.dev"

grype/distro/type_test.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,20 @@ func TestTypeFromRelease(t *testing.T) {
116116
},
117117
want: Alpine,
118118
},
119+
{
120+
name: "cleanstart ID mapping",
121+
release: linux.Release{
122+
ID: "cleanstart",
123+
},
124+
want: Clnstrt,
125+
},
126+
{
127+
name: "clnstrt ID mapping",
128+
release: linux.Release{
129+
ID: "clnstrt",
130+
},
131+
want: Clnstrt,
132+
},
119133
{
120134
name: "Scientific Linux 6",
121135
release: linux.Release{

0 commit comments

Comments
 (0)