Documentation ¶
Index ¶
- func CreateMockAllFunction(err error, rs ...repos.Repo) func() ([]repos.Repo, error)
- func CreateMockGetFunction(t *testing.T, spec model.RepoSpec, r repos.Repo, err error) func(s model.RepoSpec) (repos.Repo, error)
- func FailTest(t interface{ ... }, args ...any)
- func MockReposAll(t interface{ ... }, mock func() ([]repos.Repo, error))
- func MockReposGet(t interface{ ... }, mock func(spec model.RepoSpec) (repos.Repo, error))
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateMockAllFunction ¶
func CreateMockGetFunction ¶
func MockReposAll ¶
MockReposAll temporarily replaces the All() function with the provided mock for testing purposes. If you use own implementation of t, as opposed to *testing.T, you must make sure that registered cleanup function is called to restore the original All()
func MockReposGet ¶
func MockReposGet(t interface { Cleanup(func()) }, mock func(spec model.RepoSpec) (repos.Repo, error))
MockReposGet temporarily replaces the Get() function with the provided mock for testing purposes. If you use own implementation of t, as opposed to *testing.T, you must make sure that registered cleanup function is called to restore the original Get()
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.