github.com/lineaje-labs/syft@v0.98.1-0.20231227153149-9e393f60ff1b/syft/pkg/cataloger/alpine/cataloger_test.go (about) 1 package alpine 2 3 import ( 4 "testing" 5 6 "github.com/lineaje-labs/syft/syft/pkg/cataloger/internal/pkgtest" 7 ) 8 9 func TestCataloger_Globs(t *testing.T) { 10 tests := []struct { 11 name string 12 fixture string 13 expected []string 14 }{ 15 { 16 name: "obtain DB files", 17 fixture: "test-fixtures/glob-paths", 18 expected: []string{"lib/apk/db/installed"}, 19 }, 20 } 21 22 for _, test := range tests { 23 t.Run(test.name, func(t *testing.T) { 24 pkgtest.NewCatalogTester(). 25 FromDirectory(t, test.fixture). 26 ExpectsResolverContentQueries(test.expected). 27 IgnoreUnfulfilledPathResponses("etc/apk/repositories"). 28 TestCataloger(t, NewDBCataloger()) 29 }) 30 } 31 }