wagoodman / dive

A tool for exploring each layer in a docker image
MIT License
45.72k stars 1.74k forks source link

Test coverage below threshold #518

Open hack3ric opened 5 months ago

hack3ric commented 5 months ago

What happened:

Building Dive on Arch Linux's PKGBUILD failed with insufficient test coverage:

==> Starting check()...
/bin/bash: line 1: git: command not found
mkdir -p ./.tmp
Running unit tests
go test -race -coverprofile ./.tmp/unit-coverage-details.txt ./...
go: downloading github.com/sergi/go-diff v1.0.0
        github.com/wagoodman/dive               coverage: 0.0% of statements
        github.com/wagoodman/dive/cmd           coverage: 0.0% of statements
        github.com/wagoodman/dive/dive/image            coverage: 0.0% of statements
        github.com/wagoodman/dive/dive          coverage: 0.0% of statements
        github.com/wagoodman/dive/dive/image/podman             coverage: 0.0% of statements
        github.com/wagoodman/dive/runtime/ui/format             coverage: 0.0% of statements
        github.com/wagoodman/dive/runtime/ui/view               coverage: 0.0% of statements
        github.com/wagoodman/dive/runtime/ui/key                coverage: 0.0% of statements
        github.com/wagoodman/dive/runtime/ui            coverage: 0.0% of statements
        github.com/wagoodman/dive/utils         coverage: 0.0% of statements
        github.com/wagoodman/dive/runtime/ui/layout/compound            coverage: 0.0% of statements
ok      github.com/wagoodman/dive/dive/filetree 1.016s  coverage: 58.0% of statements
ok      github.com/wagoodman/dive/dive/image/docker     1.028s  coverage: 41.9% of statements
ok      github.com/wagoodman/dive/runtime       1.214s  coverage: 6.3% of statements
ok      github.com/wagoodman/dive/runtime/ci    1.028s  coverage: 55.4% of statements
ok      github.com/wagoodman/dive/runtime/export        1.027s  coverage: 43.9% of statements
ok      github.com/wagoodman/dive/runtime/ui/layout     1.013s  coverage: 82.6% of statements
ok      github.com/wagoodman/dive/runtime/ui/viewmodel  1.829s  coverage: 50.2% of statements
Coverage: 31.8%
Coverage below threshold of 55.0%
make: *** [Makefile:177: unit] Error 1
==> ERROR: A failure occurred in check().
    Aborting...

What you expected to happen:

Test passes

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

makepkg -s on Arch Linux's PKGBUILD

Anything else we need to know?:

Environment: