Documentation ¶
Index ¶
- type IShipyardRetrieverMock
- func (mock *IShipyardRetrieverMock) GetCachedShipyard(projectName string) (*keptnv2.Shipyard, error)
- func (mock *IShipyardRetrieverMock) GetCachedShipyardCalls() []struct{ ... }
- func (mock *IShipyardRetrieverMock) GetLatestCommitID(projectName string, stageName string) (string, error)
- func (mock *IShipyardRetrieverMock) GetLatestCommitIDCalls() []struct{ ... }
- func (mock *IShipyardRetrieverMock) GetShipyard(projectName string) (*keptnv2.Shipyard, error)
- func (mock *IShipyardRetrieverMock) GetShipyardCalls() []struct{ ... }
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IShipyardRetrieverMock ¶
type IShipyardRetrieverMock struct { // GetCachedShipyardFunc mocks the GetCachedShipyard method. GetCachedShipyardFunc func(projectName string) (*keptnv2.Shipyard, error) // GetLatestCommitIDFunc mocks the GetLatestCommitID method. GetLatestCommitIDFunc func(projectName string, stageName string) (string, error) // GetShipyardFunc mocks the GetShipyard method. GetShipyardFunc func(projectName string) (*keptnv2.Shipyard, error) // contains filtered or unexported fields }
IShipyardRetrieverMock is a mock implementation of shipyardretriever.IShipyardRetriever.
func TestSomethingThatUsesIShipyardRetriever(t *testing.T) { // make and configure a mocked shipyardretriever.IShipyardRetriever mockedIShipyardRetriever := &IShipyardRetrieverMock{ GetCachedShipyardFunc: func(projectName string) (*keptnv2.Shipyard, error) { panic("mock out the GetCachedShipyard method") }, GetLatestCommitIDFunc: func(projectName string, stageName string) (string, error) { panic("mock out the GetLatestCommitID method") }, GetShipyardFunc: func(projectName string) (*keptnv2.Shipyard, error) { panic("mock out the GetShipyard method") }, } // use mockedIShipyardRetriever in code that requires shipyardretriever.IShipyardRetriever // and then make assertions. }
func (*IShipyardRetrieverMock) GetCachedShipyard ¶
func (mock *IShipyardRetrieverMock) GetCachedShipyard(projectName string) (*keptnv2.Shipyard, error)
GetCachedShipyard calls GetCachedShipyardFunc.
func (*IShipyardRetrieverMock) GetCachedShipyardCalls ¶
func (mock *IShipyardRetrieverMock) GetCachedShipyardCalls() []struct { ProjectName string }
GetCachedShipyardCalls gets all the calls that were made to GetCachedShipyard. Check the length with:
len(mockedIShipyardRetriever.GetCachedShipyardCalls())
func (*IShipyardRetrieverMock) GetLatestCommitID ¶
func (mock *IShipyardRetrieverMock) GetLatestCommitID(projectName string, stageName string) (string, error)
GetLatestCommitID calls GetLatestCommitIDFunc.
func (*IShipyardRetrieverMock) GetLatestCommitIDCalls ¶
func (mock *IShipyardRetrieverMock) GetLatestCommitIDCalls() []struct { ProjectName string StageName string }
GetLatestCommitIDCalls gets all the calls that were made to GetLatestCommitID. Check the length with:
len(mockedIShipyardRetriever.GetLatestCommitIDCalls())
func (*IShipyardRetrieverMock) GetShipyard ¶
func (mock *IShipyardRetrieverMock) GetShipyard(projectName string) (*keptnv2.Shipyard, error)
GetShipyard calls GetShipyardFunc.
func (*IShipyardRetrieverMock) GetShipyardCalls ¶
func (mock *IShipyardRetrieverMock) GetShipyardCalls() []struct { ProjectName string }
GetShipyardCalls gets all the calls that were made to GetShipyard. Check the length with:
len(mockedIShipyardRetriever.GetShipyardCalls())
Click to show internal directories.
Click to hide internal directories.