Skip to content

Commit

Permalink
Report usages of the deprecated 'ext.loadimpact' option
Browse files Browse the repository at this point in the history
  • Loading branch information
joanlopez committed Dec 2, 2024
1 parent ec1f601 commit cd20b81
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cmd/test_load.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit cd20b81

Please sign in to comment.