@@ -89,9 +89,15 @@ var _ = Describe("API", Ordered, func() {
89
89
"%s:%s:%s": {
90
90
"last_updated_at": "%s",
91
91
"acquired": null,
92
- "known": []
92
+ "known": [],
93
+ "config": {
94
+ "stabilize_duration": %d,
95
+ "ttl": %d,
96
+ "expected_request_count": %d,
97
+ "delay_assignment_count": %d
98
+ }
93
99
}
94
- }` , owner , repo , baseRef , now .Format (time .RFC3339 ))
100
+ }` , owner , repo , baseRef , now .Format (time .RFC3339 ), configHelper . DefaultConfigRepoStabilizeDurationSeconds , configHelper . DefaultConfigRepoTTLSeconds , configHelper . DefaultConfigRepoExpectedRequestCount , configHelper . DefaultConfigRepoDelayAssignmentCount )
95
101
96
102
Expect (providerListingRespBody ).To (MatchJSON (expectedPayload ))
97
103
})
@@ -122,9 +128,15 @@ var _ = Describe("API", Ordered, func() {
122
128
"%s:%s:%s": {
123
129
"last_updated_at": "%s",
124
130
"acquired": %s,
125
- "known": %s
131
+ "known": %s,
132
+ "config": {
133
+ "stabilize_duration": %d,
134
+ "ttl": %d,
135
+ "expected_request_count": %d,
136
+ "delay_assignment_count": %d
137
+ }
126
138
}
127
- }` , owner , repo , baseRef , providerStateOpts .LastUpdatedAt .Format (time .RFC3339 ), acquiredLeaseRequestPayloadJSON , leaseRequestsPayloadsJSON )
139
+ }` , owner , repo , baseRef , providerStateOpts .LastUpdatedAt .Format (time .RFC3339 ), acquiredLeaseRequestPayloadJSON , leaseRequestsPayloadsJSON , configHelper . DefaultConfigRepoStabilizeDurationSeconds , configHelper . DefaultConfigRepoTTLSeconds , configHelper . DefaultConfigRepoExpectedRequestCount , configHelper . DefaultConfigRepoDelayAssignmentCount )
128
140
129
141
Expect (providerListingRespBody ).To (MatchJSON (expectedPayload ))
130
142
})
@@ -159,8 +171,14 @@ var _ = Describe("API", Ordered, func() {
159
171
expectedPayload := fmt .Sprintf (`{
160
172
"last_updated_at": "%s",
161
173
"acquired": null,
162
- "known": []
163
- }` , now .Format (time .RFC3339 ))
174
+ "known": [],
175
+ "config": {
176
+ "stabilize_duration": %d,
177
+ "ttl": %d,
178
+ "expected_request_count": %d,
179
+ "delay_assignment_count": %d
180
+ }
181
+ }` , now .Format (time .RFC3339 ), configHelper .DefaultConfigRepoStabilizeDurationSeconds , configHelper .DefaultConfigRepoTTLSeconds , configHelper .DefaultConfigRepoExpectedRequestCount , configHelper .DefaultConfigRepoDelayAssignmentCount )
164
182
165
183
Expect (providerDetailsRespBody ).To (MatchJSON (expectedPayload ))
166
184
})
@@ -190,8 +208,14 @@ var _ = Describe("API", Ordered, func() {
190
208
expectedPayload := fmt .Sprintf (`{
191
209
"last_updated_at": "%s",
192
210
"acquired": %s,
193
- "known": %s
194
- }` , providerStateOpts .LastUpdatedAt .Format (time .RFC3339 ), acquiredLeaseRequestPayloadJSON , leaseRequestsPayloadsJSON )
211
+ "known": %s,
212
+ "config": {
213
+ "stabilize_duration": %d,
214
+ "ttl": %d,
215
+ "expected_request_count": %d,
216
+ "delay_assignment_count": %d
217
+ }
218
+ }` , providerStateOpts .LastUpdatedAt .Format (time .RFC3339 ), acquiredLeaseRequestPayloadJSON , leaseRequestsPayloadsJSON , configHelper .DefaultConfigRepoStabilizeDurationSeconds , configHelper .DefaultConfigRepoTTLSeconds , configHelper .DefaultConfigRepoExpectedRequestCount , configHelper .DefaultConfigRepoDelayAssignmentCount )
195
219
196
220
Expect (providerDetailsRespBody ).To (MatchJSON (expectedPayload ))
197
221
})
@@ -220,8 +244,14 @@ var _ = Describe("API", Ordered, func() {
220
244
expectedPayload := fmt .Sprintf (`{
221
245
"last_updated_at": "%s",
222
246
"acquired": null,
223
- "known": []
224
- }` , clk .Now ().Format (time .RFC3339 ))
247
+ "known": [],
248
+ "config": {
249
+ "stabilize_duration": %d,
250
+ "ttl": %d,
251
+ "expected_request_count": %d,
252
+ "delay_assignment_count": %d
253
+ }
254
+ }` , clk .Now ().Format (time .RFC3339 ), configHelper .DefaultConfigRepoStabilizeDurationSeconds , configHelper .DefaultConfigRepoTTLSeconds , configHelper .DefaultConfigRepoExpectedRequestCount , configHelper .DefaultConfigRepoDelayAssignmentCount )
225
255
Expect (respBody ).To (MatchJSON (expectedPayload ))
226
256
}
227
257
0 commit comments