Skip to content

Instantly share code, notes, and snippets.

@deads2k
Created July 9, 2015 15:30
Show Gist options
  • Save deads2k/dba0992dbe98ea49c34e to your computer and use it in GitHub Desktop.
Save deads2k/dba0992dbe98ea49c34e to your computer and use it in GitHub Desktop.
type MockDCClient struct{
Rollback DeploymentConfig
}
func (c *MockDCClient) Rollback(rollback){
return c.Rollback = rollback
}
type MockRCClient struct{
RCs []*ReplicationController
}
func NewMockRCClient([]existingDeployment) MockRCClient{
// fluff the rcs here
}
func (c *MockRCClient) List(){
return c.RCs
}
func (c *MockRCClient) Get(){
return nil, errors.New("not supported")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment