MCPcopy Index your code
hub / github.com/cli/cli / MigrationMock

Struct MigrationMock

internal/gh/mock/migration.go:37–64  ·  view source on GitHub ↗

MigrationMock is a mock implementation of gh.Migration. func TestSomethingThatUsesMigration(t *testing.T) { // make and configure a mocked gh.Migration mockedMigration := &MigrationMock{ DoFunc: func(config *ghConfig.Config) error { panic("mock out the Do method") }, PostVersionF

Source from the content-addressed store, hash-verified

35//
36// }
37type MigrationMock struct {
38 // DoFunc mocks the Do method.
39 DoFunc func(config *ghConfig.Config) error
40
41 // PostVersionFunc mocks the PostVersion method.
42 PostVersionFunc func() string
43
44 // PreVersionFunc mocks the PreVersion method.
45 PreVersionFunc func() string
46
47 // calls tracks calls to the methods.
48 calls struct {
49 // Do holds details about calls to the Do method.
50 Do []struct {
51 // Config is the config argument value.
52 Config *ghConfig.Config
53 }
54 // PostVersion holds details about calls to the PostVersion method.
55 PostVersion []struct {
56 }
57 // PreVersion holds details about calls to the PreVersion method.
58 PreVersion []struct {
59 }
60 }
61 lockDo sync.RWMutex
62 lockPostVersion sync.RWMutex
63 lockPreVersion sync.RWMutex
64}
65
66// Do calls DoFunc.
67func (mock *MigrationMock) Do(config *ghConfig.Config) error {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected