Skip to content

Commit 4db718f

Browse files
committed
formating all files
1 parent 21c047f commit 4db718f

File tree

5 files changed

+65
-65
lines changed

5 files changed

+65
-65
lines changed

deploy/deploy_test.go

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -69,57 +69,57 @@ func TestASGAndClusters(t *testing.T) {
6969
"stack and detail",
7070
tcase{"foo", "test", "us-east-1", "foo-staging-bar", "foo-staging-bar-v031", []string{"i-ff075688", "i-d9165a77"}},
7171
[]at{
72-
at{(*ASG).Name, "foo-staging-bar-v031"},
73-
at{(*ASG).AppName, "foo"},
74-
at{(*ASG).AccountName, "test"},
75-
at{(*ASG).RegionName, "us-east-1"},
76-
at{(*ASG).ClusterName, "foo-staging-bar"},
77-
at{(*ASG).StackName, "staging"},
78-
at{(*ASG).DetailName, "bar"},
72+
{(*ASG).Name, "foo-staging-bar-v031"},
73+
{(*ASG).AppName, "foo"},
74+
{(*ASG).AccountName, "test"},
75+
{(*ASG).RegionName, "us-east-1"},
76+
{(*ASG).ClusterName, "foo-staging-bar"},
77+
{(*ASG).StackName, "staging"},
78+
{(*ASG).DetailName, "bar"},
7979
},
8080
[]ct{
81-
ct{(*Cluster).Name, "foo-staging-bar"},
82-
ct{(*Cluster).AppName, "foo"},
83-
ct{(*Cluster).AccountName, "test"},
84-
ct{(*Cluster).StackName, "staging"},
81+
{(*Cluster).Name, "foo-staging-bar"},
82+
{(*Cluster).AppName, "foo"},
83+
{(*Cluster).AccountName, "test"},
84+
{(*Cluster).StackName, "staging"},
8585
},
8686
},
8787
{
8888
"no detail",
8989
tcase{"chaosguineapig", "prod", "eu-west-1", "chaosguineapig-staging", "chaosguineapig-staging-v000", []string{"i-7f40bbf5", "i-7a61d6f2"}},
9090
[]at{
91-
at{(*ASG).Name, "chaosguineapig-staging-v000"},
92-
at{(*ASG).AppName, "chaosguineapig"},
93-
at{(*ASG).AccountName, "prod"},
94-
at{(*ASG).RegionName, "eu-west-1"},
95-
at{(*ASG).ClusterName, "chaosguineapig-staging"},
96-
at{(*ASG).StackName, "staging"},
97-
at{(*ASG).DetailName, ""},
91+
{(*ASG).Name, "chaosguineapig-staging-v000"},
92+
{(*ASG).AppName, "chaosguineapig"},
93+
{(*ASG).AccountName, "prod"},
94+
{(*ASG).RegionName, "eu-west-1"},
95+
{(*ASG).ClusterName, "chaosguineapig-staging"},
96+
{(*ASG).StackName, "staging"},
97+
{(*ASG).DetailName, ""},
9898
},
9999
[]ct{
100-
ct{(*Cluster).Name, "chaosguineapig-staging"},
101-
ct{(*Cluster).AppName, "chaosguineapig"},
102-
ct{(*Cluster).AccountName, "prod"},
103-
ct{(*Cluster).StackName, "staging"},
100+
{(*Cluster).Name, "chaosguineapig-staging"},
101+
{(*Cluster).AppName, "chaosguineapig"},
102+
{(*Cluster).AccountName, "prod"},
103+
{(*Cluster).StackName, "staging"},
104104
},
105105
},
106106
{
107107
"no stack",
108108
tcase{"chaosguineapig", "test", "eu-west-1", "chaosguineapig", "chaosguineapig-v030", []string{"i-7f40bbf5", "i-7a61d6f2"}},
109109
[]at{
110-
at{(*ASG).Name, "chaosguineapig-v030"},
111-
at{(*ASG).AppName, "chaosguineapig"},
112-
at{(*ASG).AccountName, "test"},
113-
at{(*ASG).RegionName, "eu-west-1"},
114-
at{(*ASG).ClusterName, "chaosguineapig"},
115-
at{(*ASG).StackName, ""},
116-
at{(*ASG).DetailName, ""},
110+
{(*ASG).Name, "chaosguineapig-v030"},
111+
{(*ASG).AppName, "chaosguineapig"},
112+
{(*ASG).AccountName, "test"},
113+
{(*ASG).RegionName, "eu-west-1"},
114+
{(*ASG).ClusterName, "chaosguineapig"},
115+
{(*ASG).StackName, ""},
116+
{(*ASG).DetailName, ""},
117117
},
118118
[]ct{
119-
ct{(*Cluster).Name, "chaosguineapig"},
120-
ct{(*Cluster).AppName, "chaosguineapig"},
121-
ct{(*Cluster).AccountName, "test"},
122-
ct{(*Cluster).StackName, ""},
119+
{(*Cluster).Name, "chaosguineapig"},
120+
{(*Cluster).AppName, "chaosguineapig"},
121+
{(*Cluster).AccountName, "test"},
122+
{(*Cluster).StackName, ""},
123123
},
124124
},
125125
{
@@ -129,19 +129,19 @@ func TestASGAndClusters(t *testing.T) {
129129
"detail looks like push number",
130130
tcase{"foo", "prod", "us-west-2", "foo-bar-v2", "foo-bar-v2", []string{"i-c7a513fc", "i-e06cfef1"}},
131131
[]at{
132-
at{(*ASG).Name, "foo-bar-v2"},
133-
at{(*ASG).AppName, "foo"},
134-
at{(*ASG).AccountName, "prod"},
135-
at{(*ASG).RegionName, "us-west-2"},
136-
at{(*ASG).ClusterName, "foo-bar-v2"},
137-
at{(*ASG).StackName, "bar"},
138-
at{(*ASG).DetailName, "v2"},
132+
{(*ASG).Name, "foo-bar-v2"},
133+
{(*ASG).AppName, "foo"},
134+
{(*ASG).AccountName, "prod"},
135+
{(*ASG).RegionName, "us-west-2"},
136+
{(*ASG).ClusterName, "foo-bar-v2"},
137+
{(*ASG).StackName, "bar"},
138+
{(*ASG).DetailName, "v2"},
139139
},
140140
[]ct{
141-
ct{(*Cluster).Name, "foo-bar-v2"},
142-
ct{(*Cluster).AppName, "foo"},
143-
ct{(*Cluster).AccountName, "prod"},
144-
ct{(*Cluster).StackName, "bar"},
141+
{(*Cluster).Name, "foo-bar-v2"},
142+
{(*Cluster).AppName, "foo"},
143+
{(*Cluster).AccountName, "prod"},
144+
{(*Cluster).StackName, "bar"},
145145
},
146146
},
147147
}

migration/migrations.go

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mysql/schedstore_test.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ func TestPublishRetrieveMultipleEntries(t *testing.T) {
101101
psched := schedule.New()
102102

103103
pEntries := []schedule.Entry{
104-
schedule.Entry{Time: time.Date(2016, time.June, 20, 11, 40, 0, 0, loc), Group: grp.New("doesnotexist", "test", "us-east-1", "", "doesnotexist-foo-bar")},
105-
schedule.Entry{Time: time.Date(2016, time.June, 20, 12, 35, 0, 0, loc), Group: grp.New("foobar", "other", "us-west-2", "", "foobar-baz-quux")},
106-
schedule.Entry{Time: time.Date(2016, time.June, 20, 9, 7, 0, 0, loc), Group: grp.New("chaosguineapig", "prod", "us-east-1", "", "chaosguineapig-prod")},
104+
{Time: time.Date(2016, time.June, 20, 11, 40, 0, 0, loc), Group: grp.New("doesnotexist", "test", "us-east-1", "", "doesnotexist-foo-bar")},
105+
{Time: time.Date(2016, time.June, 20, 12, 35, 0, 0, loc), Group: grp.New("foobar", "other", "us-west-2", "", "foobar-baz-quux")},
106+
{Time: time.Date(2016, time.June, 20, 9, 7, 0, 0, loc), Group: grp.New("chaosguineapig", "prod", "us-east-1", "", "chaosguineapig-prod")},
107107
}
108108

109109
for _, v := range pEntries {
@@ -164,9 +164,9 @@ func TestScheduleAlreadyExists(t *testing.T) {
164164
// Try to publish a new schedule
165165

166166
pEntries := []schedule.Entry{
167-
schedule.Entry{Time: time.Date(2016, time.June, 20, 11, 40, 0, 0, loc), Group: grp.New("doesnotexist", "test", "us-east-1", "", "doesnotexist-foo-bar")},
168-
schedule.Entry{Time: time.Date(2016, time.June, 20, 12, 35, 0, 0, loc), Group: grp.New("foobar", "other", "us-west-2", "", "foobar-baz-quux")},
169-
schedule.Entry{Time: time.Date(2016, time.June, 20, 9, 7, 0, 0, loc), Group: grp.New("chaosguineapig", "prod", "us-east-1", "", "chaosguineapig-prod")},
167+
{Time: time.Date(2016, time.June, 20, 11, 40, 0, 0, loc), Group: grp.New("doesnotexist", "test", "us-east-1", "", "doesnotexist-foo-bar")},
168+
{Time: time.Date(2016, time.June, 20, 12, 35, 0, 0, loc), Group: grp.New("foobar", "other", "us-west-2", "", "foobar-baz-quux")},
169+
{Time: time.Date(2016, time.June, 20, 9, 7, 0, 0, loc), Group: grp.New("chaosguineapig", "prod", "us-east-1", "", "chaosguineapig-prod")},
170170
}
171171

172172
psched2 := schedule.New()
@@ -202,9 +202,9 @@ func TestScheduleAlreadyExistsConcurrency(t *testing.T) {
202202
psched1.Add(time.Date(2016, time.June, 20, 11, 40, 0, 0, loc), grp.New("imaginaryproject", "test", "us-west-2", "", ""))
203203

204204
pEntries := []schedule.Entry{
205-
schedule.Entry{Time: time.Date(2016, time.June, 20, 11, 40, 0, 0, loc), Group: grp.New("doesnotexist", "test", "us-east-1", "", "doesnotexist-foo-bar")},
206-
schedule.Entry{Time: time.Date(2016, time.June, 20, 12, 35, 0, 0, loc), Group: grp.New("foobar", "other", "us-west-2", "", "foobar-baz-quux")},
207-
schedule.Entry{Time: time.Date(2016, time.June, 20, 9, 7, 0, 0, loc), Group: grp.New("chaosguineapig", "prod", "us-east-1", "", "chaosguineapig-prod")},
205+
{Time: time.Date(2016, time.June, 20, 11, 40, 0, 0, loc), Group: grp.New("doesnotexist", "test", "us-east-1", "", "doesnotexist-foo-bar")},
206+
{Time: time.Date(2016, time.June, 20, 12, 35, 0, 0, loc), Group: grp.New("foobar", "other", "us-west-2", "", "foobar-baz-quux")},
207+
{Time: time.Date(2016, time.June, 20, 9, 7, 0, 0, loc), Group: grp.New("chaosguineapig", "prod", "us-east-1", "", "chaosguineapig-prod")},
208208
}
209209

210210
psched2 := schedule.New()
@@ -282,9 +282,9 @@ func TestOnlyReturnsFromDayRequested(t *testing.T) {
282282
psched2 := schedule.New()
283283
d2 := time.Date(2016, time.June, 21, 0, 0, 0, 0, loc)
284284
pEntries := []schedule.Entry{
285-
schedule.Entry{Time: time.Date(2016, time.June, 21, 11, 40, 0, 0, loc), Group: grp.New("doesnotexist", "test", "us-east-1", "", "doesnotexist-foo-bar")},
286-
schedule.Entry{Time: time.Date(2016, time.June, 21, 12, 35, 0, 0, loc), Group: grp.New("foobar", "other", "us-west-2", "", "foobar-baz-quux")},
287-
schedule.Entry{Time: time.Date(2016, time.June, 21, 9, 7, 0, 0, loc), Group: grp.New("chaosguineapig", "prod", "us-east-1", "", "chaosguineapig-prod")},
285+
{Time: time.Date(2016, time.June, 21, 11, 40, 0, 0, loc), Group: grp.New("doesnotexist", "test", "us-east-1", "", "doesnotexist-foo-bar")},
286+
{Time: time.Date(2016, time.June, 21, 12, 35, 0, 0, loc), Group: grp.New("foobar", "other", "us-west-2", "", "foobar-baz-quux")},
287+
{Time: time.Date(2016, time.June, 21, 9, 7, 0, 0, loc), Group: grp.New("chaosguineapig", "prod", "us-east-1", "", "chaosguineapig-prod")},
288288
}
289289

290290
for _, v := range pEntries {

spinnaker/fromjson_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ func TestFromJSON(t *testing.T) {
7070
}
7171

7272
expectedEx := []chaosmonkey.Exception{
73-
chaosmonkey.Exception{Account: "test", Stack: "*", Detail: "*", Region: "*"},
74-
chaosmonkey.Exception{Account: "prod", Stack: "*", Detail: "*", Region: "eu-west-1"},
73+
{Account: "test", Stack: "*", Detail: "*", Region: "*"},
74+
{Account: "prod", Stack: "*", Detail: "*", Region: "eu-west-1"},
7575
}
7676

7777
actualEx := actual.Exceptions
@@ -261,8 +261,8 @@ func TestFromJSONPopulatedWhitelist(t *testing.T) {
261261
actualWl := *actual.Whitelist
262262

263263
expectedWl := []chaosmonkey.Exception{
264-
chaosmonkey.Exception{Account: "test", Stack: "*", Detail: "*", Region: "*"},
265-
chaosmonkey.Exception{Account: "prod", Stack: "*", Detail: "*", Region: "eu-west-1"},
264+
{Account: "test", Stack: "*", Detail: "*", Region: "*"},
265+
{Account: "prod", Stack: "*", Detail: "*", Region: "eu-west-1"},
266266
}
267267

268268
if len(actualWl) != len(expectedWl) {

spinnaker/terminator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func killJSONPayload(ins chaosmonkey.Instance, otherID string, spinnakerUser str
117117
Application: ins.AppName(),
118118
Description: desc,
119119
Job: []kpJob{
120-
kpJob{
120+
{
121121
User: spinnakerUser,
122122
Type: terminateType,
123123
Credentials: ins.AccountName(),

0 commit comments

Comments
 (0)