Skip to content

Commit

Permalink
update test names, update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ldelossa committed Jan 22, 2020
1 parent e379666 commit 930a362
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 22 deletions.
4 changes: 2 additions & 2 deletions oracle/distributionscanner.go
Expand Up @@ -11,11 +11,11 @@ import (
"github.com/rs/zerolog"
)

// Oracle Linux does provide sub major releases such as 7.7 and 6.10
// Oracle Linux has minor releases such as 7.7 and 6.10
// however their elsa OVAL xml sec db always references the major release
// for example: <platform>Oracle Linux 5</platform>
// for this reason the oracle distribution scanner will detect and normalize
// sub releases to major releases to match vulnerabilities correctly
// minor releases to major releases to match vulnerabilities correctly

const (
scannerName = "oracle"
Expand Down
19 changes: 2 additions & 17 deletions oracle/releases.go
Expand Up @@ -2,11 +2,11 @@ package oracle

import "github.com/quay/claircore"

// Oracle Linux does provide sub major releases such as 7.7 and 6.10
// Oracle Linux has minor releases such as 7.7 and 6.10
// however their elsa OVAL xml sec db always references the major release
// for example: <platform>Oracle Linux 5</platform>
// for this reason the oracle distribution scanner will detect and normalize
// sub releases to major releases to match vulnerabilities correctly
// minor releases to major releases to match vulnerabilities correctly

type Release string

Expand All @@ -17,21 +17,6 @@ const (
Five Release = "5"
)

// NAME="Oracle Linux Server"
// VERSION="6.9"
// ID="ol"
// VERSION_ID="6.9"
// PRETTY_NAME="Oracle Linux Server 6.9"
// ANSI_COLOR="0;31"
// CPE_NAME="cpe:/o:oracle:linux:6:9:server"
// HOME_URL="https://linux.oracle.com/"
// BUG_REPORT_URL="https://bugzilla.oracle.com/"

// ORACLE_BUGZILLA_PRODUCT="Oracle Linux 6"
// ORACLE_BUGZILLA_PRODUCT_VERSION=6.9
// ORACLE_SUPPORT_PRODUCT="Oracle Linux"
// ORACLE_SUPPORT_PRODUCT_VERSION=6.9

var eightDist = &claircore.Distribution{
Name: "Oracle Linux Server",
Version: "8",
Expand Down
2 changes: 1 addition & 1 deletion rhel/releases.go
Expand Up @@ -2,7 +2,7 @@ package rhel

import "github.com/quay/claircore"

// RHEL has sub major releases however their security database files are bundled together
// RHEL has minor releases however their security database files are bundled together
// by major version. for example `com.redhat.rhsa-RHEL7.xml`
// we choose to normalize detected distributions into major releases and parse vulnerabilities by major release versions.

Expand Down
4 changes: 2 additions & 2 deletions ubuntu/distributionscanner_test.go
Expand Up @@ -246,7 +246,7 @@ DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=
DISTRIB_DESCRIPTION="Ubuntu 16.04.6 LTS"`)

func TestUbuntuDistributionScanner(t *testing.T) {
func TestDistributionScanner(t *testing.T) {
table := []struct {
name string
release Release
Expand Down Expand Up @@ -311,7 +311,7 @@ func TestUbuntuDistributionScanner(t *testing.T) {
}
}

func TestUbuntuDistributionScannerBad(t *testing.T) {
func TestDistributionScannerBad(t *testing.T) {
table := []struct {
name string
release Release
Expand Down

0 comments on commit 930a362

Please sign in to comment.