Documentation
¶
Overview ¶
Package clienttest provides a mock resolution client for testing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMockResolutionClient ¶
func NewMockResolutionClient(t *testing.T, universeYaml, vulnJSON string) client.ResolutionClient
Types ¶
type ResolutionUniverse ¶
type VulnerabilityMatcher ¶ added in v2.3.0
type VulnerabilityMatcher struct {
Vulns []*osvschema.Vulnerability `json:"vulns"`
}
func (*VulnerabilityMatcher) MatchVulnerabilities ¶ added in v2.3.0
func (vm *VulnerabilityMatcher) MatchVulnerabilities(_ context.Context, invs []*extractor.Package) ([][]*osvschema.Vulnerability, error)
func (*VulnerabilityMatcher) UnmarshalJSON ¶ added in v2.3.0
func (vm *VulnerabilityMatcher) UnmarshalJSON(data []byte) error
UnmarshalJSON unmarshals the mock vulns. The Vulnerability field is a proto message, so it needs to be unmarshaled with protojson.
Click to show internal directories.
Click to hide internal directories.