mock

package
v1.9.22-beta005 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: MIT, MIT Imports: 2 Imported by: 0

Documentation

Overview

Package mock contains all the mocks used in testing

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fetcher

type Fetcher struct {
	FetchFn                     func(content *testkube.TestContent) (path string, err error)
	FetchStringFn               func(str string) (path string, err error)
	FetchURIFn                  func(uri string) (path string, err error)
	FetchGitDirFn               func(repo *testkube.Repository) (path string, err error)
	FetchGitFileFn              func(repo *testkube.Repository) (path string, err error)
	FetchGitFn                  func(repo *testkube.Repository) (path string, err error)
	FetchCalculateContentTypeFn func(repo testkube.Repository) (string, error)
}

Fetcher implements the Mock version of the content fetcher from "github.com/kubeshop/testkube/pkg/executor/content"

func (Fetcher) CalculateGitContentType

func (f Fetcher) CalculateGitContentType(repo testkube.Repository) (string, error)

func (Fetcher) Fetch

func (f Fetcher) Fetch(content *testkube.TestContent) (path string, err error)

func (Fetcher) FetchGit

func (f Fetcher) FetchGit(repo *testkube.Repository) (path string, err error)

func (Fetcher) FetchGitDir

func (f Fetcher) FetchGitDir(repo *testkube.Repository) (path string, err error)

func (Fetcher) FetchGitFile

func (f Fetcher) FetchGitFile(repo *testkube.Repository) (path string, err error)

func (Fetcher) FetchString

func (f Fetcher) FetchString(str string) (path string, err error)

func (Fetcher) FetchURI

func (f Fetcher) FetchURI(str string) (path string, err error)

type Scraper

type Scraper struct {
	ScrapeFn func(id string, directories []string) error
}

Scraper implements a mock for the Scraper from "github.com/kubeshop/testkube/pkg/executor/scraper"

func (Scraper) Scrape

func (s Scraper) Scrape(id string, directories []string) error

Jump to

Keyboard shortcuts

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