Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: Will Murphy <[email protected]>
  • Loading branch information
willmurphyscode committed May 8, 2024
1 parent bf4b4f9 commit 532170e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
3 changes: 2 additions & 1 deletion grype/db/v3/namespace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,9 @@ func Test_NamespaceForDistro(t *testing.T) {
allDistros.Add(d.String())
}

// TODO: what do we do with mariner
// v3 and older schemas don't include these newer distros:
allDistros.Remove(distro.Mariner.String())
allDistros.Remove(distro.Azure.String())

for _, test := range tests {
name := fmt.Sprintf("%s:%s", test.dist, test.version)
Expand Down
5 changes: 5 additions & 0 deletions grype/distro/distro_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,11 @@ func Test_NewDistroFromRelease_Coverage(t *testing.T) {
Type: Mariner,
Version: "1.0.0",
},
{
fixture: "test-fixtures/os/azurelinux",
Type: Azure,
Version: "3.0.0",
},
{
fixture: "test-fixtures/os/rockylinux",
Type: RockyLinux,
Expand Down
9 changes: 9 additions & 0 deletions grype/distro/test-fixtures/os/azurelinux/etc/os-release
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
NAME="Microsoft Azure Linux"
VERSION="3.0.20240417"
ID=azurelinux
VERSION_ID="3.0"
PRETTY_NAME="Microsoft Azure Linux 3.0"
ANSI_COLOR="1;34"
HOME_URL="https://aka.ms/azurelinux"
BUG_REPORT_URL="https://aka.ms/azurelinux"
SUPPORT_URL="https://aka.ms/azurelinux"

0 comments on commit 532170e

Please sign in to comment.