From cd20b81bef728ca49d8a53b344c99836f0c804ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20L=C3=B3pez=20de=20la=20Franca=20Beltran?= Date: Mon, 2 Dec 2024 14:03:16 +0100 Subject: [PATCH] Report usages of the deprecated 'ext.loadimpact' option --- cmd/test_load.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cmd/test_load.go b/cmd/test_load.go index f022e415576..7b3f32c7883 100644 --- a/cmd/test_load.go +++ b/cmd/test_load.go @@ -265,11 +265,19 @@ func loadSystemCertPool(logger logrus.FieldLogger) { func (lct *loadedAndConfiguredTest) buildTestRunState( configToReinject lib.Options, ) (*lib.TestRunState, error) { - // This might be the full derived or just the consodlidated options + // This might be the full derived or just the consolidated options if err := lct.initRunner.SetOptions(configToReinject); err != nil { return nil, err } + // Here, where we get the consolidated options, is where we check if any + // of the deprecated options is being used, and we report it. + if _, isPresent := configToReinject.External["loadimpact"]; isPresent { + if err := lct.preInitState.Usage.Strings("deprecated_options", "ext.loadimpact"); err != nil { + return nil, err + } + } + // it pre-loads system certificates to avoid doing it on the first TLS request. // This is done async to avoid blocking the rest of the loading process as it will not stop if it fails. go loadSystemCertPool(lct.preInitState.Logger)