Skip to content

Commit cd20b81

Browse files
committed
Report usages of the deprecated 'ext.loadimpact' option
1 parent ec1f601 commit cd20b81

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

cmd/test_load.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,11 +265,19 @@ func loadSystemCertPool(logger logrus.FieldLogger) {
265265
func (lct *loadedAndConfiguredTest) buildTestRunState(
266266
configToReinject lib.Options,
267267
) (*lib.TestRunState, error) {
268-
// This might be the full derived or just the consodlidated options
268+
// This might be the full derived or just the consolidated options
269269
if err := lct.initRunner.SetOptions(configToReinject); err != nil {
270270
return nil, err
271271
}
272272

273+
// Here, where we get the consolidated options, is where we check if any
274+
// of the deprecated options is being used, and we report it.
275+
if _, isPresent := configToReinject.External["loadimpact"]; isPresent {
276+
if err := lct.preInitState.Usage.Strings("deprecated_options", "ext.loadimpact"); err != nil {
277+
return nil, err
278+
}
279+
}
280+
273281
// it pre-loads system certificates to avoid doing it on the first TLS request.
274282
// This is done async to avoid blocking the rest of the loading process as it will not stop if it fails.
275283
go loadSystemCertPool(lct.preInitState.Logger)

0 commit comments

Comments
 (0)