@@ -52,17 +52,21 @@ func TestClusterUp(t *testing.T) {
5252 mockEcs := mock_ecs .NewMockECSClient (ctrl )
5353 mockCloudformation := mock_cloudformation .NewMockCloudformationClient (ctrl )
5454
55- mockEcs .EXPECT ().Initialize (gomock .Any ())
56- mockEcs .EXPECT ().CreateCluster (gomock .Any ()).Do (func (in interface {}) {
57- if in .(string ) != clusterName {
58- t .Fatal ("Expected to be called with " + clusterName + " not " + in .(string ))
59- }
60- }).Return (clusterName , nil )
55+ gomock .InOrder (
56+ mockEcs .EXPECT ().Initialize (gomock .Any ()),
57+ mockEcs .EXPECT ().CreateCluster (gomock .Any ()).Do (func (in interface {}) {
58+ if in .(string ) != clusterName {
59+ t .Fatal ("Expected to be called with " + clusterName + " not " + in .(string ))
60+ }
61+ }).Return (clusterName , nil ),
62+ )
6163
62- mockCloudformation .EXPECT ().Initialize (gomock .Any ())
63- mockCloudformation .EXPECT ().ValidateStackExists (gomock .Any ()).Return (errors .New ("error" ))
64- mockCloudformation .EXPECT ().CreateStack (gomock .Any (), gomock .Any (), gomock .Any ()).Return ("" , nil )
65- mockCloudformation .EXPECT ().WaitUntilCreateComplete (gomock .Any ()).Return (nil )
64+ gomock .InOrder (
65+ mockCloudformation .EXPECT ().Initialize (gomock .Any ()),
66+ mockCloudformation .EXPECT ().ValidateStackExists (gomock .Any ()).Return (errors .New ("error" )),
67+ mockCloudformation .EXPECT ().CreateStack (gomock .Any (), gomock .Any (), gomock .Any ()).Return ("" , nil ),
68+ mockCloudformation .EXPECT ().WaitUntilCreateComplete (gomock .Any ()).Return (nil ),
69+ )
6670
6771 globalSet := flag .NewFlagSet ("ecs-cli" , 0 )
6872 globalSet .String ("region" , "us-west-1" , "" )
0 commit comments