You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it('correctly identifies toolchain updates vs go version updates',()=>{
167
+
consttoolChainUpdategoModBefore=codeBlock`
168
+
go 1.22.0
169
+
170
+
toolchain go1.23.0
171
+
172
+
require (
173
+
github.com/foo/foo v1.0.0
174
+
github.com/bar/bar v2.0.0
175
+
)
176
+
`;
177
+
178
+
consttoolChainUpdategoModAfter=codeBlock`
179
+
go 1.22.0
180
+
181
+
toolchain go1.24.0
182
+
183
+
// Note the order change
184
+
require (
185
+
github.com/bar/bar v2.2.2
186
+
github.com/foo/foo v1.1.1
187
+
)
188
+
`;
189
+
constres=getExtraDepsNotice(
190
+
toolChainUpdategoModBefore,
191
+
toolChainUpdategoModAfter,
192
+
[],
193
+
);
194
+
195
+
expect(res).toEqual(
196
+
[
197
+
'In order to perform the update(s) described in the table above, Renovate ran the `go get` command, which resulted in the following additional change(s):',
it('correctly identifies and distinguishes toolchain updates vs go version updates when both are present',()=>{
216
+
consttoolChainUpdategoModBefore=codeBlock`
217
+
go 1.22.0
218
+
219
+
toolchain go1.23.0
220
+
221
+
require (
222
+
github.com/foo/foo v1.0.0
223
+
github.com/bar/bar v2.0.0
224
+
)
225
+
`;
226
+
227
+
consttoolChainUpdategoModAfter=codeBlock`
228
+
go 1.22.2
229
+
230
+
toolchain go1.24.0
231
+
232
+
// Note the order change
233
+
require (
234
+
github.com/bar/bar v2.2.2
235
+
github.com/foo/foo v1.1.1
236
+
)
237
+
`;
238
+
constres=getExtraDepsNotice(
239
+
toolChainUpdategoModBefore,
240
+
toolChainUpdategoModAfter,
241
+
[],
242
+
);
243
+
244
+
expect(res).toEqual(
245
+
[
246
+
'In order to perform the update(s) described in the table above, Renovate ran the `go get` command, which resulted in the following additional change(s):',
247
+
'',
248
+
'',
249
+
'- 2 additional dependencies were updated',
250
+
'- The `go` directive was updated for compatibility reasons',
it('correctly handles the introduction of a toolchain directive by not indicating a change',()=>{
267
+
consttoolChainUpdategoModBefore=codeBlock`
268
+
go 1.22.0
269
+
270
+
require (
271
+
github.com/foo/foo v1.0.0
272
+
github.com/bar/bar v2.0.0
273
+
)
274
+
`;
275
+
276
+
consttoolChainUpdategoModAfter=codeBlock`
277
+
go 1.22.0
278
+
279
+
toolchain go1.24.0
280
+
281
+
// Note the order change
282
+
require (
283
+
github.com/bar/bar v2.2.2
284
+
github.com/foo/foo v1.1.1
285
+
)
286
+
`;
287
+
constres=getExtraDepsNotice(
288
+
toolChainUpdategoModBefore,
289
+
toolChainUpdategoModAfter,
290
+
[],
291
+
);
292
+
293
+
expect(res).toEqual(
294
+
[
295
+
'In order to perform the update(s) described in the table above, Renovate ran the `go get` command, which resulted in the following additional change(s):',
0 commit comments