@@ -56,17 +56,20 @@ func TestItLogsSummaryInformation(t *testing.T) {
56
56
func TestItLogsDetailedInformation (t * testing.T ) {
57
57
prepareFakeResponses ()
58
58
59
- testsupport .PrepareTempCampaign (true , "org/repo1" , "org/repo2" , "org/repo3" )
59
+ testsupport .PrepareTempCampaign (true , "org/repo1" , "org/repo2" , "org/repo3" , "org/repo4" , "org/repo5" , "org/repo6" )
60
60
61
61
out , err := runCommand (true )
62
62
assert .NoError (t , err )
63
63
// Should still show summary info
64
- assert .Regexp (t , "Open\\ s+1" , out )
65
- assert .Regexp (t , "👍\\ s+4" , out )
66
-
67
- assert .Regexp (t , "org/repo1\\ s+OPEN\\ s+REVIEW_REQUIRED" , out )
68
- assert .Regexp (t , "org/repo2\\ s+MERGED\\ s+APPROVED" , out )
69
- assert .Regexp (t , "org/repo3\\ s+CLOSED" , out )
64
+ assert .Regexp (t , "Open\\ s+4" , out )
65
+ assert .Regexp (t , "👍\\ s+13" , out )
66
+
67
+ assert .Regexp (t , "org/repo1\\ s+OPEN\\ s+REVIEW_REQUIRED\\ s+FAILURE" , out )
68
+ assert .Regexp (t , "org/repo2\\ s+MERGED\\ s+APPROVED\\ s+SUCCESS" , out )
69
+ assert .Regexp (t , "org/repo3\\ s+CLOSED\\ s+FAILURE" , out )
70
+ assert .Regexp (t , "org/repo4\\ s+OPEN\\ s+REVIEW_REQUIRED\\ s+PENDING" , out )
71
+ assert .Regexp (t , "org/repo5\\ s+OPEN\\ s+REVIEW_REQUIRED\\ s+FAILURE" , out )
72
+ assert .Regexp (t , "org/repo6\\ s+OPEN\\ s+REVIEW_REQUIRED\\ s+PENDING" , out )
70
73
}
71
74
72
75
func TestItSkipsUnclonedRepos (t * testing.T ) {
@@ -119,6 +122,14 @@ func prepareFakeResponses() {
119
122
dummyData := map [string ]* github.PrStatus {
120
123
"work/org/repo1" : {
121
124
State : "OPEN" ,
125
+ StatusCheckRollup : []github.StatusCheckRollup {
126
+ {
127
+ State : "FAILURE" ,
128
+ },
129
+ {
130
+ State : "SUCCESS" ,
131
+ },
132
+ },
122
133
ReactionGroups : []github.ReactionGroup {
123
134
{
124
135
Content : "THUMBS_UP" ,
@@ -137,6 +148,14 @@ func prepareFakeResponses() {
137
148
},
138
149
"work/org/repo2" : {
139
150
State : "MERGED" ,
151
+ StatusCheckRollup : []github.StatusCheckRollup {
152
+ {
153
+ State : "SUCCESS" ,
154
+ },
155
+ {
156
+ State : "SUCCESS" ,
157
+ },
158
+ },
140
159
ReactionGroups : []github.ReactionGroup {
141
160
{
142
161
Content : "THUMBS_UP" ,
@@ -148,7 +167,13 @@ func prepareFakeResponses() {
148
167
ReviewDecision : "APPROVED" ,
149
168
},
150
169
"work/org/repo3" : {
151
- State : "CLOSED" ,
170
+ State : "CLOSED" ,
171
+ Mergeable : "UNKNOWN" ,
172
+ StatusCheckRollup : []github.StatusCheckRollup {
173
+ {
174
+ State : "FAILURE" ,
175
+ },
176
+ },
152
177
ReactionGroups : []github.ReactionGroup {
153
178
{
154
179
Content : "THUMBS_DOWN" ,
@@ -158,6 +183,66 @@ func prepareFakeResponses() {
158
183
},
159
184
},
160
185
},
186
+ "work/org/repo4" : {
187
+ State : "OPEN" ,
188
+ StatusCheckRollup : []github.StatusCheckRollup {
189
+ {
190
+ State : "SUCCESS" ,
191
+ },
192
+ {
193
+ State : "PENDING" ,
194
+ },
195
+ },
196
+ ReactionGroups : []github.ReactionGroup {
197
+ {
198
+ Content : "THUMBS_UP" ,
199
+ Users : github.ReactionGroupUsers {
200
+ TotalCount : 3 ,
201
+ },
202
+ },
203
+ },
204
+ ReviewDecision : "REVIEW_REQUIRED" ,
205
+ },
206
+ "work/org/repo5" : {
207
+ State : "OPEN" ,
208
+ StatusCheckRollup : []github.StatusCheckRollup {
209
+ {
210
+ State : "FAILURE" ,
211
+ },
212
+ {
213
+ State : "PENDING" ,
214
+ },
215
+ },
216
+ ReactionGroups : []github.ReactionGroup {
217
+ {
218
+ Content : "THUMBS_UP" ,
219
+ Users : github.ReactionGroupUsers {
220
+ TotalCount : 3 ,
221
+ },
222
+ },
223
+ },
224
+ ReviewDecision : "REVIEW_REQUIRED" ,
225
+ },
226
+ "work/org/repo6" : {
227
+ State : "OPEN" ,
228
+ StatusCheckRollup : []github.StatusCheckRollup {
229
+ {
230
+ State : "PENDING" ,
231
+ },
232
+ {
233
+ State : "PENDING" ,
234
+ },
235
+ },
236
+ ReactionGroups : []github.ReactionGroup {
237
+ {
238
+ Content : "THUMBS_UP" ,
239
+ Users : github.ReactionGroupUsers {
240
+ TotalCount : 3 ,
241
+ },
242
+ },
243
+ },
244
+ ReviewDecision : "REVIEW_REQUIRED" ,
245
+ },
161
246
}
162
247
fakeGitHub := github .NewFakeGitHub (nil , func (workingDir string ) (interface {}, error ) {
163
248
if workingDir == "work/org/repoWithError" {
0 commit comments