vulnsrctest

package
v0.0.0-...-74e1113 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestGet

func TestGet(t *testing.T, vulnsrc Getter, args TestGetArgs)

func TestUpdate

func TestUpdate(t *testing.T, vulnsrc Updater, args TestUpdateArgs)

Types

type Getter

type Getter interface {
	Get(string, string) ([]types.Advisory, error)
}

type GetterGetArgs

type GetterGetArgs struct {
	// contains filtered or unexported fields
}

type GetterGetExpectation

type GetterGetExpectation struct {
	Args    GetterGetArgs
	Returns GetterGetReturns
}

type GetterGetReturns

type GetterGetReturns struct {
	// contains filtered or unexported fields
}

type MockGetter

type MockGetter struct {
	mock.Mock
}

MockGetter is an autogenerated mock type for the Getter type

func (*MockGetter) ApplyGetExpectation

func (_m *MockGetter) ApplyGetExpectation(e GetterGetExpectation)

func (*MockGetter) ApplyGetExpectations

func (_m *MockGetter) ApplyGetExpectations(expectations []GetterGetExpectation)

func (*MockGetter) Get

func (_m *MockGetter) Get(_a0 string, _a1 string) ([]types.Advisory, error)

Get provides a mock function with given fields: _a0, _a1

type MockUpdater

type MockUpdater struct {
	mock.Mock
}

MockUpdater is an autogenerated mock type for the Updater type

func (*MockUpdater) ApplyUpdateExpectation

func (_m *MockUpdater) ApplyUpdateExpectation(e UpdaterUpdateExpectation)

func (*MockUpdater) ApplyUpdateExpectations

func (_m *MockUpdater) ApplyUpdateExpectations(expectations []UpdaterUpdateExpectation)

func (*MockUpdater) Update

func (_m *MockUpdater) Update(dir string) error

Update provides a mock function with given fields: dir

type TestGetArgs

type TestGetArgs struct {
	Fixtures   []string
	WantValues []types.Advisory
	Release    string
	PkgName    string
	WantErr    string
}

type TestUpdateArgs

type TestUpdateArgs struct {
	Dir        string
	WantValues []WantValues
	WantErr    string
	NoBuckets  [][]string
}

type Updater

type Updater interface {
	Update(dir string) (err error)
}

type UpdaterUpdateArgs

type UpdaterUpdateArgs struct {
	Dir         string
	DirAnything bool
}

type UpdaterUpdateExpectation

type UpdaterUpdateExpectation struct {
	Args    UpdaterUpdateArgs
	Returns UpdaterUpdateReturns
}

type UpdaterUpdateReturns

type UpdaterUpdateReturns struct {
	Err error
}

type WantValues

type WantValues struct {
	Key   []string
	Value interface{}
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL