Skip to content

Commit

Permalink
database: Rename affected type to feature type (for Amazon Linux upda…
Browse files Browse the repository at this point in the history
…ter)
  • Loading branch information
Eric Sim committed Apr 11, 2019
1 parent adde759 commit 6617f56
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
3 changes: 1 addition & 2 deletions ext/vulnsrc/amzn/amzn.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import (

log "github.com/sirupsen/logrus"


"github.com/coreos/clair/database"
"github.com/coreos/clair/ext/versionfmt"
"github.com/coreos/clair/ext/versionfmt/rpm"
Expand Down Expand Up @@ -325,7 +324,7 @@ func (u *updater) alasToFeatureVersions(alas ALAS) []database.AffectedFeature {
},
FeatureName: p.Name,
AffectedVersion: version,
AffectedType: database.AffectBinaryPackage,
FeatureType: database.BinaryPackage,
}

if version != versionfmt.MaxVersion {
Expand Down
16 changes: 8 additions & 8 deletions ext/vulnsrc/amzn/amzn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func TestAmazonLinux1(t *testing.T) {
FeatureName: "httpd-devel",
AffectedVersion: "2.2.21-1.18.amzn1",
FixedInVersion: "2.2.21-1.18.amzn1",
AffectedType: database.AffectBinaryPackage,
FeatureType: database.BinaryPackage,
},
{
Namespace: database.Namespace{
Expand All @@ -77,7 +77,7 @@ func TestAmazonLinux1(t *testing.T) {
FeatureName: "httpd-debuginfo",
AffectedVersion: "2.2.21-1.18.amzn1",
FixedInVersion: "2.2.21-1.18.amzn1",
AffectedType: database.AffectBinaryPackage,
FeatureType: database.BinaryPackage,
},
}

Expand All @@ -100,7 +100,7 @@ func TestAmazonLinux1(t *testing.T) {
FeatureName: "cyrus-imapd-debuginfo",
AffectedVersion: "2.3.16-6.4.amzn1",
FixedInVersion: "2.3.16-6.4.amzn1",
AffectedType: database.AffectBinaryPackage,
FeatureType: database.BinaryPackage,
},
{
Namespace: database.Namespace{
Expand All @@ -110,7 +110,7 @@ func TestAmazonLinux1(t *testing.T) {
FeatureName: "cyrus-imapd-utils",
AffectedVersion: "2.3.16-6.4.amzn1",
FixedInVersion: "2.3.16-6.4.amzn1",
AffectedType: database.AffectBinaryPackage,
FeatureType: database.BinaryPackage,
},
}

Expand Down Expand Up @@ -160,7 +160,7 @@ func TestAmazonLinux2(t *testing.T) {
FeatureName: "kernel",
AffectedVersion: "4.9.76-38.79.amzn2",
FixedInVersion: "4.9.76-38.79.amzn2",
AffectedType: database.AffectBinaryPackage,
FeatureType: database.BinaryPackage,
},
{
Namespace: database.Namespace{
Expand All @@ -170,7 +170,7 @@ func TestAmazonLinux2(t *testing.T) {
FeatureName: "kernel-headers",
AffectedVersion: "4.9.76-38.79.amzn2",
FixedInVersion: "4.9.76-38.79.amzn2",
AffectedType: database.AffectBinaryPackage,
FeatureType: database.BinaryPackage,
},
}

Expand All @@ -193,7 +193,7 @@ func TestAmazonLinux2(t *testing.T) {
FeatureName: "qemu-kvm",
AffectedVersion: "10:1.5.3-141.amzn2.5.3",
FixedInVersion: "10:1.5.3-141.amzn2.5.3",
AffectedType: database.AffectBinaryPackage,
FeatureType: database.BinaryPackage,
},
{
Namespace: database.Namespace{
Expand All @@ -203,7 +203,7 @@ func TestAmazonLinux2(t *testing.T) {
FeatureName: "qemu-img",
AffectedVersion: "10:1.5.3-141.amzn2.5.3",
FixedInVersion: "10:1.5.3-141.amzn2.5.3",
AffectedType: database.AffectBinaryPackage,
FeatureType: database.BinaryPackage,
},
}

Expand Down

0 comments on commit 6617f56

Please sign in to comment.