Skip to content

Instantly share code, notes, and snippets.

@vaijab
Created June 6, 2017 16:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vaijab/d4695e919c5a68a109ec1700fc8b0c80 to your computer and use it in GitHub Desktop.
Save vaijab/d4695e919c5a68a109ec1700fc8b0c80 to your computer and use it in GitHub Desktop.
m.Clusters.On("GetClusters", cluster.Name).Return([]*model.Cluster{}, nil).Once()
m.Clusters.On("CreateClusterInfra", cluster).Return(nil)
m.Clusters.On("PushAssets", cluster.Name, model.Assets{}).Return(nil)
// At this point the cluster already exists.
m.Clusters.On("GetClusters", cluster.Name).Return([]*model.Cluster{&cluster}, nil).Once()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment