Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distro tests fail within nixos #1822

Open
JordanFaust opened this issue Apr 24, 2024 · 0 comments
Open

Distro tests fail within nixos #1822

JordanFaust opened this issue Apr 24, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@JordanFaust
Copy link

What happened:
When building the latest version of grype the distro tests fail

What you expected to happen:
Successful build of grype

How to reproduce it (as minimally and precisely as possible):

nix profile install nixpkgs/92d295f588631b0db2da509f381b4fb1e74173c5#grype

Anything else we need to know?:

Test Failures:

--- FAIL: Test_NewDistroFromRelease_Coverage (0.01s)
    --- FAIL: Test_NewDistroFromRelease_Coverage/test-fixtures/os/alpine (0.00s)
        distro_test.go:254:
                Error Trace:    /build/source/grype/distro/distro_test.go:254
                Error:          Expected value not to be nil.
                Test:           Test_NewDistroFromRelease_Coverage/test-fixtures/os/alpine
                Messages:       empty linux release info
    --- FAIL: Test_NewDistroFromRelease_Coverage/test-fixtures/os/amazon (0.00s)
        distro_test.go:254:
                Error Trace:    /build/source/grype/distro/distro_test.go:254
                Error:          Expected value not to be nil.
                Test:           Test_NewDistroFromRelease_Coverage/test-fixtures/os/amazon
                Messages:       empty linux release info
    --- FAIL: Test_NewDistroFromRelease_Coverage/test-fixtures/os/busybox (0.00s)
        distro_test.go:254:
                Error Trace:    /build/source/grype/distro/distro_test.go:254
                Error:          Expected value not to be nil.
                Test:           Test_NewDistroFromRelease_Coverage/test-fixtures/os/busybox
                Messages:       empty linux release info
    --- FAIL: Test_NewDistroFromRelease_Coverage/test-fixtures/os/centos (0.00s)
        distro_test.go:254:
                Error Trace:    /build/source/grype/distro/distro_test.go:254
                Error:          Expected value not to be nil.
                Test:           Test_NewDistroFromRelease_Coverage/test-fixtures/os/centos
                Messages:       empty linux release info
    --- FAIL: Test_NewDistroFromRelease_Coverage/test-fixtures/os/debian (0.00s)
        distro_test.go:254:
                Error Trace:    /build/source/grype/distro/distro_test.go:254
                Error:          Expected value not to be nil.
                Test:           Test_NewDistroFromRelease_Coverage/test-fixtures/os/debian
                Messages:       empty linux release info
    --- FAIL: Test_NewDistroFromRelease_Coverage/test-fixtures/os/fedora (0.00s)
        distro_test.go:254:
                Error Trace:    /build/source/grype/distro/distro_test.go:254
                Error:          Expected value not to be nil.
                Test:           Test_NewDistroFromRelease_Coverage/test-fixtures/os/fedora
                Messages:       empty linux release info
    --- FAIL: Test_NewDistroFromRelease_Coverage/test-fixtures/os/redhat (0.00s)
        distro_test.go:254:
                Error Trace:    /build/source/grype/distro/distro_test.go:254
                Error:          Expected value not to be nil.
                Test:           Test_NewDistroFromRelease_Coverage/test-fixtures/os/redhat
                Messages:       empty linux release info
    --- FAIL: Test_NewDistroFromRelease_Coverage/test-fixtures/os/ubuntu (0.00s)
        distro_test.go:254:
                Error Trace:    /build/source/grype/distro/distro_test.go:254
                Error:          Expected value not to be nil.
                Test:           Test_NewDistroFromRelease_Coverage/test-fixtures/os/ubuntu
                Messages:       empty linux release info
    --- FAIL: Test_NewDistroFromRelease_Coverage/test-fixtures/os/oraclelinux (0.00s)
        distro_test.go:254:
                Error Trace:    /build/source/grype/distro/distro_test.go:254
                Error:          Expected value not to be nil.
                Test:           Test_NewDistroFromRelease_Coverage/test-fixtures/os/oraclelinux
                Messages:       empty linux release info
    --- FAIL: Test_NewDistroFromRelease_Coverage/test-fixtures/os/custom (0.00s)
        distro_test.go:254:
                Error Trace:    /build/source/grype/distro/distro_test.go:254
                Error:          Expected value not to be nil.
                Test:           Test_NewDistroFromRelease_Coverage/test-fixtures/os/custom
                Messages:       empty linux release info
    --- FAIL: Test_NewDistroFromRelease_Coverage/test-fixtures/os/opensuse-leap (0.00s)
        distro_test.go:254:
                Error Trace:    /build/source/grype/distro/distro_test.go:254
                Error:          Expected value not to be nil.
                Test:           Test_NewDistroFromRelease_Coverage/test-fixtures/os/opensuse-leap
                Messages:       empty linux release info
    --- FAIL: Test_NewDistroFromRelease_Coverage/test-fixtures/os/sles (0.00s)
        distro_test.go:254:
                Error Trace:    /build/source/grype/distro/distro_test.go:254
                Error:          Expected value not to be nil.
                Test:           Test_NewDistroFromRelease_Coverage/test-fixtures/os/sles
                Messages:       empty linux release info
    --- FAIL: Test_NewDistroFromRelease_Coverage/test-fixtures/os/photon (0.00s)
        distro_test.go:254:
                Error Trace:    /build/source/grype/distro/distro_test.go:254
                Error:          Expected value not to be nil.
                Test:           Test_NewDistroFromRelease_Coverage/test-fixtures/os/photon
                Messages:       empty linux release info
    --- FAIL: Test_NewDistroFromRelease_Coverage/test-fixtures/os/arch (0.00s)
        distro_test.go:254:
                Error Trace:    /build/source/grype/distro/distro_test.go:254
                Error:          Expected value not to be nil.
                Test:           Test_NewDistroFromRelease_Coverage/test-fixtures/os/arch
                Messages:       empty linux release info
    --- FAIL: Test_NewDistroFromRelease_Coverage/test-fixtures/partial-fields/missing-id (0.00s)
        distro_test.go:254:
                Error Trace:    /build/source/grype/distro/distro_test.go:254
                Error:          Expected value not to be nil.
                Test:           Test_NewDistroFromRelease_Coverage/test-fixtures/partial-fields/missing-id
                Messages:       empty linux release info
    --- FAIL: Test_NewDistroFromRelease_Coverage/test-fixtures/partial-fields/unknown-id (0.00s)
        distro_test.go:254:
                Error Trace:    /build/source/grype/distro/distro_test.go:254
                Error:          Expected value not to be nil.
                Test:           Test_NewDistroFromRelease_Coverage/test-fixtures/partial-fields/unknown-id
                Messages:       empty linux release info
    --- FAIL: Test_NewDistroFromRelease_Coverage/test-fixtures/os/centos6 (0.00s)
        distro_test.go:254:
                Error Trace:    /build/source/grype/distro/distro_test.go:254
                Error:          Expected value not to be nil.
                Test:           Test_NewDistroFromRelease_Coverage/test-fixtures/os/centos6
                Messages:       empty linux release info
    --- FAIL: Test_NewDistroFromRelease_Coverage/test-fixtures/os/centos5 (0.00s)
        distro_test.go:254:
                Error Trace:    /build/source/grype/distro/distro_test.go:254
                Error:          Expected value not to be nil.
                Test:           Test_NewDistroFromRelease_Coverage/test-fixtures/os/centos5
                Messages:       empty linux release info
    --- FAIL: Test_NewDistroFromRelease_Coverage/test-fixtures/os/mariner (0.00s)
        distro_test.go:254:
                Error Trace:    /build/source/grype/distro/distro_test.go:254
                Error:          Expected value not to be nil.
                Test:           Test_NewDistroFromRelease_Coverage/test-fixtures/os/mariner
                Messages:       empty linux release info
    --- FAIL: Test_NewDistroFromRelease_Coverage/test-fixtures/os/rockylinux (0.00s)
        distro_test.go:254:
                Error Trace:    /build/source/grype/distro/distro_test.go:254
                Error:          Expected value not to be nil.
                Test:           Test_NewDistroFromRelease_Coverage/test-fixtures/os/rockylinux
                Messages:       empty linux release info
    --- FAIL: Test_NewDistroFromRelease_Coverage/test-fixtures/os/almalinux (0.00s)
        distro_test.go:254:
                Error Trace:    /build/source/grype/distro/distro_test.go:254
                Error:          Expected value not to be nil.
                Test:           Test_NewDistroFromRelease_Coverage/test-fixtures/os/almalinux
                Messages:       empty linux release info
    --- FAIL: Test_NewDistroFromRelease_Coverage/test-fixtures/os/gentoo (0.00s)
        distro_test.go:254:
                Error Trace:    /build/source/grype/distro/distro_test.go:254
                Error:          Expected value not to be nil.
                Test:           Test_NewDistroFromRelease_Coverage/test-fixtures/os/gentoo
                Messages:       empty linux release info
    --- FAIL: Test_NewDistroFromRelease_Coverage/test-fixtures/os/wolfi (0.00s)
        distro_test.go:254:
                Error Trace:    /build/source/grype/distro/distro_test.go:254
                Error:          Expected value not to be nil.
                Test:           Test_NewDistroFromRelease_Coverage/test-fixtures/os/wolfi
                Messages:       empty linux release info
    --- FAIL: Test_NewDistroFromRelease_Coverage/test-fixtures/os/chainguard (0.00s)
        distro_test.go:254:
                Error Trace:    /build/source/grype/distro/distro_test.go:254
                Error:          Expected value not to be nil.
                Test:           Test_NewDistroFromRelease_Coverage/test-fixtures/os/chainguard
                Messages:       empty linux release info
    distro_test.go:272:    defined: ubuntu
    distro_test.go:272:    defined: centos
    distro_test.go:272:    defined: amazonlinux
    distro_test.go:272:    defined: oraclelinux
    distro_test.go:272:    defined: sles
    distro_test.go:272:    defined: wolfi
    distro_test.go:272:    defined: fedora
    distro_test.go:272:    defined: opensuseleap
    distro_test.go:272:    defined: chainguard
    distro_test.go:272:    defined: redhat
    distro_test.go:272:    defined: alpine
    distro_test.go:272:    defined: photon
    distro_test.go:272:    defined: gentoo
    distro_test.go:272:    defined: debian
    distro_test.go:272:    defined: busybox
    distro_test.go:272:    defined: archlinux
    distro_test.go:272:    defined: mariner
    distro_test.go:272:    defined: rockylinux
    distro_test.go:272:    defined: almalinux
    distro_test.go:277: distro coverage incomplete (defined=19, coverage=0)

Environment:

  • Output of grype version:
  • OS (e.g: cat /etc/os-release or similar):
ANSI_COLOR="1;34"
BUG_REPORT_URL="https://github.com/NixOS/nixpkgs/issues"
BUILD_ID="24.05.20240329.d8fe5e6"
DOCUMENTATION_URL="https://nixos.org/learn.html"
HOME_URL="https://nixos.org/"
ID=nixos
IMAGE_ID=""
IMAGE_VERSION=""
LOGO="nix-snowflake"
NAME=NixOS
PRETTY_NAME="NixOS 24.05 (Uakari)"
SUPPORT_URL="https://nixos.org/community.html"
VERSION="24.05 (Uakari)"
VERSION_CODENAME=uakari
VERSION_ID="24.05"
@JordanFaust JordanFaust added the bug Something isn't working label Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

1 participant