Documentation
¶
Index ¶
- func ExpectErrContaining(t *testing.T, err error, str string)
- func ExpectErrIs(t *testing.T, err error, expected error)
- func ExpectPackage(t *testing.T, packages []lockfile.PackageDetails, pkg lockfile.PackageDetails)
- func ExpectPackages(t *testing.T, actualPackages []lockfile.PackageDetails, ...)
- func ExpectPackagesWithoutLocations(t *testing.T, actualPackages []lockfile.PackageDetails, ...)
- func GetTestContext() lockfile.ScanContext
- func HasPackage(t *testing.T, expectedPkgs []lockfile.PackageDetails, ...) bool
- func InnerExpectPackage(t *testing.T, expectedPkgs []lockfile.PackageDetails, ...)
- func InnerExpectPackages(t *testing.T, actualPackages []lockfile.PackageDetails, ...)
- func MockAllMatchers()
- func PackageToString(pkg lockfile.PackageDetails) string
- type FailingMatcher
- type SuccessfulMatcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpectPackage ¶
func ExpectPackage(t *testing.T, packages []lockfile.PackageDetails, pkg lockfile.PackageDetails)
func ExpectPackages ¶
func ExpectPackages(t *testing.T, actualPackages []lockfile.PackageDetails, expectedPackages []lockfile.PackageDetails)
func ExpectPackagesWithoutLocations ¶
func ExpectPackagesWithoutLocations(t *testing.T, actualPackages []lockfile.PackageDetails, expectedPackages []lockfile.PackageDetails)
func GetTestContext ¶ added in v1.4.0
func GetTestContext() lockfile.ScanContext
func HasPackage ¶
func HasPackage(t *testing.T, expectedPkgs []lockfile.PackageDetails, currentPkg lockfile.PackageDetails, ignoreLocations bool) bool
func InnerExpectPackage ¶
func InnerExpectPackage(t *testing.T, expectedPkgs []lockfile.PackageDetails, currentPkg lockfile.PackageDetails, ignoreLocations bool)
func InnerExpectPackages ¶
func InnerExpectPackages(t *testing.T, actualPackages []lockfile.PackageDetails, expectedPackages []lockfile.PackageDetails, ignoreLocations bool)
func MockAllMatchers ¶
func MockAllMatchers()
func PackageToString ¶
func PackageToString(pkg lockfile.PackageDetails) string
Types ¶
type FailingMatcher ¶
type FailingMatcher struct {
Error error
}
func (FailingMatcher) GetSourceFile ¶
func (FailingMatcher) Match ¶
func (m FailingMatcher) Match(sourceFile lockfile.DepFile, packages []lockfile.PackageDetails, context lockfile.ScanContext) error
type SuccessfulMatcher ¶
type SuccessfulMatcher struct{}
func (SuccessfulMatcher) GetSourceFile ¶
func (SuccessfulMatcher) Match ¶
func (m SuccessfulMatcher) Match(sourceFile lockfile.DepFile, packages []lockfile.PackageDetails, context lockfile.ScanContext) error
Click to show internal directories.
Click to hide internal directories.