Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build linux
//go:build !windows

// Package rpm extracts packages from rpm database.
package rpm
Expand Down Expand Up @@ -113,7 +113,9 @@ func (e Extractor) Name() string { return Name }
func (e Extractor) Version() int { return 0 }

// Requirements of the extractor.
func (e Extractor) Requirements() *plugin.Capabilities { return &plugin.Capabilities{} }
func (e Extractor) Requirements() *plugin.Capabilities {
return &plugin.Capabilities{}
}

// FileRequired returns true if the specified file matches rpm status file pattern.
func (e Extractor) FileRequired(api filesystem.FileAPI) bool {
Expand Down
2 changes: 1 addition & 1 deletion extractor/filesystem/os/rpm/rpm_dummy.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build !linux
//go:build windows

// Package rpm extracts packages from rpm database.
package rpm
Expand Down
7 changes: 3 additions & 4 deletions extractor/filesystem/os/rpm/rpm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"path"
"path/filepath"
"runtime"
"slices"
"sort"
"strings"
"testing"
Expand All @@ -44,7 +43,7 @@ import (

func TestFileRequired(t *testing.T) {
// supported OSes
if !slices.Contains([]string{"linux"}, runtime.GOOS) {
if runtime.GOOS == "windows" {
t.Skipf("Test skipped, OS unsupported: %v", runtime.GOOS)
}

Expand Down Expand Up @@ -172,7 +171,7 @@ VARIANT="Container Image"`

func TestExtract(t *testing.T) {
// supported OSes
if !slices.Contains([]string{"linux"}, runtime.GOOS) {
if runtime.GOOS == "windows" {
t.Skipf("Test skipped, OS unsupported: %v", runtime.GOOS)
}

Expand Down Expand Up @@ -566,7 +565,7 @@ func TestExtract(t *testing.T) {

func TestExtract_VirtualFilesystem(t *testing.T) {
// supported OSes
if !slices.Contains([]string{"linux"}, runtime.GOOS) {
if runtime.GOOS == "windows" {
t.Skipf("Test skipped, OS unsupported: %v", runtime.GOOS)
}

Expand Down
Loading