Documentation ¶
Index ¶
- func AssertPackagesEqual(t *testing.T, a, b pkg.Package)
- func TestFileParser(t *testing.T, fixturePath string, parser generic.Parser, ...)
- func TestFileParserWithEnv(t *testing.T, fixturePath string, parser generic.Parser, ...)
- type CatalogTester
- func (p *CatalogTester) Expects(pkgs []pkg.Package, relationships []artifact.Relationship) *CatalogTester
- func (p *CatalogTester) ExpectsAssertion(...) *CatalogTester
- func (p *CatalogTester) ExpectsPackageStrings(expected []string) *CatalogTester
- func (p *CatalogTester) ExpectsRelationshipStrings(expected []string) *CatalogTester
- func (p *CatalogTester) ExpectsResolverContentQueries(locations []string) *CatalogTester
- func (p *CatalogTester) ExpectsResolverPathResponses(locations []string) *CatalogTester
- func (p *CatalogTester) FromDirectory(t *testing.T, path string) *CatalogTester
- func (p *CatalogTester) FromFile(t *testing.T, path string) *CatalogTester
- func (p *CatalogTester) FromString(location, data string) *CatalogTester
- func (p *CatalogTester) IgnoreLocationLayer() *CatalogTester
- func (p *CatalogTester) IgnorePackageFields(fields ...string) *CatalogTester
- func (p *CatalogTester) IgnoreUnfulfilledPathResponses(paths ...string) *CatalogTester
- func (p *CatalogTester) TestCataloger(t *testing.T, cataloger pkg.Cataloger)
- func (p *CatalogTester) TestParser(t *testing.T, parser generic.Parser)
- func (p *CatalogTester) WithCompareOptions(opts ...cmp.Option) *CatalogTester
- func (p *CatalogTester) WithEnv(env *generic.Environment) *CatalogTester
- func (p *CatalogTester) WithError() *CatalogTester
- func (p *CatalogTester) WithErrorAssertion(a require.ErrorAssertionFunc) *CatalogTester
- func (p *CatalogTester) WithImageResolver(t *testing.T, fixtureName string) *CatalogTester
- func (p *CatalogTester) WithLinuxRelease(r linux.Release) *CatalogTester
- func (p *CatalogTester) WithPackageStringer(fn func(pkg.Package) string) *CatalogTester
- func (p *CatalogTester) WithResolver(r file.Resolver) *CatalogTester
- type ObservingResolver
- func (r *ObservingResolver) AllContentQueries() []string
- func (r *ObservingResolver) AllLocations(ctx context.Context) <-chan file.Location
- func (r *ObservingResolver) AllPathQueries() map[string][]string
- func (r *ObservingResolver) FileContentsByLocation(location file.Location) (io.ReadCloser, error)
- func (r *ObservingResolver) FileMetadataByLocation(location file.Location) (file.Metadata, error)
- func (r *ObservingResolver) FilesByGlob(patterns ...string) ([]file.Location, error)
- func (r *ObservingResolver) FilesByMIMEType(types ...string) ([]file.Location, error)
- func (r *ObservingResolver) FilesByPath(paths ...string) ([]file.Location, error)
- func (r *ObservingResolver) HasPath(s string) bool
- func (r *ObservingResolver) HasUnfulfilledPathRequests() bool
- func (r *ObservingResolver) ObservedContentQueries(path string) bool
- func (r *ObservingResolver) ObservedPathQuery(input string) bool
- func (r *ObservingResolver) ObservedPathResponses(path string) bool
- func (r *ObservingResolver) PrettyUnfulfilledPathRequests() string
- func (r *ObservingResolver) PruneUnfulfilledPathResponses(ignore map[string][]string, ignorePaths ...string)
- func (r *ObservingResolver) RelativeFileByPath(l file.Location, path string) *file.Location
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestFileParser ¶
func TestFileParserWithEnv ¶
Types ¶
type CatalogTester ¶
type CatalogTester struct {
// contains filtered or unexported fields
}
func NewCatalogTester ¶
func NewCatalogTester() *CatalogTester
func (*CatalogTester) Expects ¶
func (p *CatalogTester) Expects(pkgs []pkg.Package, relationships []artifact.Relationship) *CatalogTester
func (*CatalogTester) ExpectsAssertion ¶
func (p *CatalogTester) ExpectsAssertion(a func(t *testing.T, pkgs []pkg.Package, relationships []artifact.Relationship)) *CatalogTester
func (*CatalogTester) ExpectsPackageStrings ¶
func (p *CatalogTester) ExpectsPackageStrings(expected []string) *CatalogTester
func (*CatalogTester) ExpectsRelationshipStrings ¶
func (p *CatalogTester) ExpectsRelationshipStrings(expected []string) *CatalogTester
func (*CatalogTester) ExpectsResolverContentQueries ¶
func (p *CatalogTester) ExpectsResolverContentQueries(locations []string) *CatalogTester
func (*CatalogTester) ExpectsResolverPathResponses ¶
func (p *CatalogTester) ExpectsResolverPathResponses(locations []string) *CatalogTester
func (*CatalogTester) FromDirectory ¶
func (p *CatalogTester) FromDirectory(t *testing.T, path string) *CatalogTester
func (*CatalogTester) FromFile ¶
func (p *CatalogTester) FromFile(t *testing.T, path string) *CatalogTester
func (*CatalogTester) FromString ¶
func (p *CatalogTester) FromString(location, data string) *CatalogTester
func (*CatalogTester) IgnoreLocationLayer ¶
func (p *CatalogTester) IgnoreLocationLayer() *CatalogTester
func (*CatalogTester) IgnorePackageFields ¶
func (p *CatalogTester) IgnorePackageFields(fields ...string) *CatalogTester
func (*CatalogTester) IgnoreUnfulfilledPathResponses ¶
func (p *CatalogTester) IgnoreUnfulfilledPathResponses(paths ...string) *CatalogTester
func (*CatalogTester) TestCataloger ¶
func (p *CatalogTester) TestCataloger(t *testing.T, cataloger pkg.Cataloger)
func (*CatalogTester) TestParser ¶
func (p *CatalogTester) TestParser(t *testing.T, parser generic.Parser)
func (*CatalogTester) WithCompareOptions ¶
func (p *CatalogTester) WithCompareOptions(opts ...cmp.Option) *CatalogTester
func (*CatalogTester) WithEnv ¶
func (p *CatalogTester) WithEnv(env *generic.Environment) *CatalogTester
func (*CatalogTester) WithError ¶
func (p *CatalogTester) WithError() *CatalogTester
func (*CatalogTester) WithErrorAssertion ¶
func (p *CatalogTester) WithErrorAssertion(a require.ErrorAssertionFunc) *CatalogTester
func (*CatalogTester) WithImageResolver ¶
func (p *CatalogTester) WithImageResolver(t *testing.T, fixtureName string) *CatalogTester
func (*CatalogTester) WithLinuxRelease ¶
func (p *CatalogTester) WithLinuxRelease(r linux.Release) *CatalogTester
func (*CatalogTester) WithPackageStringer ¶
func (p *CatalogTester) WithPackageStringer(fn func(pkg.Package) string) *CatalogTester
func (*CatalogTester) WithResolver ¶
func (p *CatalogTester) WithResolver(r file.Resolver) *CatalogTester
type ObservingResolver ¶
type ObservingResolver struct {
// contains filtered or unexported fields
}
func NewObservingResolver ¶
func NewObservingResolver(resolver file.Resolver) *ObservingResolver
func (*ObservingResolver) AllContentQueries ¶
func (r *ObservingResolver) AllContentQueries() []string
func (*ObservingResolver) AllLocations ¶
func (r *ObservingResolver) AllLocations(ctx context.Context) <-chan file.Location
func (*ObservingResolver) AllPathQueries ¶
func (r *ObservingResolver) AllPathQueries() map[string][]string
func (*ObservingResolver) FileContentsByLocation ¶
func (r *ObservingResolver) FileContentsByLocation(location file.Location) (io.ReadCloser, error)
func (*ObservingResolver) FileMetadataByLocation ¶
func (*ObservingResolver) FilesByGlob ¶
func (r *ObservingResolver) FilesByGlob(patterns ...string) ([]file.Location, error)
func (*ObservingResolver) FilesByMIMEType ¶
func (r *ObservingResolver) FilesByMIMEType(types ...string) ([]file.Location, error)
func (*ObservingResolver) FilesByPath ¶
func (r *ObservingResolver) FilesByPath(paths ...string) ([]file.Location, error)
func (*ObservingResolver) HasPath ¶
func (r *ObservingResolver) HasPath(s string) bool
func (*ObservingResolver) HasUnfulfilledPathRequests ¶
func (r *ObservingResolver) HasUnfulfilledPathRequests() bool
func (*ObservingResolver) ObservedContentQueries ¶
func (r *ObservingResolver) ObservedContentQueries(path string) bool
func (*ObservingResolver) ObservedPathQuery ¶
func (r *ObservingResolver) ObservedPathQuery(input string) bool
func (*ObservingResolver) ObservedPathResponses ¶
func (r *ObservingResolver) ObservedPathResponses(path string) bool
func (*ObservingResolver) PrettyUnfulfilledPathRequests ¶
func (r *ObservingResolver) PrettyUnfulfilledPathRequests() string
func (*ObservingResolver) PruneUnfulfilledPathResponses ¶
func (r *ObservingResolver) PruneUnfulfilledPathResponses(ignore map[string][]string, ignorePaths ...string)
func (*ObservingResolver) RelativeFileByPath ¶
Click to show internal directories.
Click to hide internal directories.