fixtures

package
v0.0.0-...-552dcf1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const ExampleJsonnetTemplate = `` /* 249-byte string literal not displayed */
View Source
const InvalidJsonnetTemplate = `` /* 133-byte string literal not displayed */
View Source
const InvalidJsonnetWorkflow = `` /* 127-byte string literal not displayed */

Variables

This section is empty.

Functions

func AssertTempDir

func AssertTempDir(t *testing.T, fs *afero.Afero, dirName string, path string)

func CreateTestFileSystem

func CreateTestFileSystem(files []File, assetNamespace string) http.FileSystem

func ExampleWorkflow

func ExampleWorkflow(sourceFileName string) string

func NewTestCommand

func NewTestCommand() *cobra.Command

func NewTestContext

func NewTestContext(configString string) (*io.Container, *config.GFlowsContext, *bytes.Buffer)

Types

type File

type File struct {
	Path    string
	Content string
}

func NewFile

func NewFile(path string, content string) File

func (*File) Write

func (f *File) Write(fs *afero.Afero)

type MockRoundTripper

type MockRoundTripper struct {
	mock.Mock
}

func NewMockRoundTripper

func NewMockRoundTripper() *MockRoundTripper

func (*MockRoundTripper) RoundTrip

func (roundTripper *MockRoundTripper) RoundTrip(request *http.Request) (*http.Response, error)

func (*MockRoundTripper) StubBody

func (roundTripper *MockRoundTripper) StubBody(url string, responseBody string)

func (*MockRoundTripper) StubResponse

func (roundTripper *MockRoundTripper) StubResponse(url string, response *http.Response)

func (*MockRoundTripper) StubStatusCode

func (roundTripper *MockRoundTripper) StubStatusCode(url string, statusCode int)

type TestGitAdapter

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

func NewTestGitAdapter

func NewTestGitAdapter(fs *afero.Afero) *TestGitAdapter

func (*TestGitAdapter) Clone

func (gitAdapter *TestGitAdapter) Clone(url string, dir string) error

func (*TestGitAdapter) StubRepo

func (gitAdapter *TestGitAdapter) StubRepo(url string, repo *TestGitRepository)

type TestGitRepository

type TestGitRepository = map[string]string

type TestRoundTripper

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

func NewTestRoundTripper

func NewTestRoundTripper() *TestRoundTripper

func (*TestRoundTripper) RoundTrip

func (roundTripper *TestRoundTripper) RoundTrip(request *http.Request) (*http.Response, error)

func (*TestRoundTripper) StubBody

func (roundTripper *TestRoundTripper) StubBody(url string, responseBody string)

func (*TestRoundTripper) StubResponse

func (roundTripper *TestRoundTripper) StubResponse(url string, response *http.Response)

func (*TestRoundTripper) StubStatusCode

func (roundTripper *TestRoundTripper) StubStatusCode(url string, statusCode int)

Jump to

Keyboard shortcuts

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