syft/test/cli/symlink_test.go
Keith Zantow a50a0f77d2
fix: capture root command stdout (#2364)
Signed-off-by: Keith Zantow <kzantow@gmail.com>
2023-11-28 15:04:28 -05:00

15 lines
352 B
Go

package cli
import (
"testing"
"github.com/stretchr/testify/assert"
)
func Test_RequestedPathIncludesSymlink(t *testing.T) {
// path contains a symlink
path := "test-fixtures/image-pkg-coverage/pkgs/java/example-java-app-maven-0.1.0.jar"
_, stdout, _ := runSyft(t, nil, "packages", path)
assert.Contains(t, stdout, "example-java-app-maven")
}