Skip to content

Commit

Permalink
fix: build error
Browse files Browse the repository at this point in the history
  • Loading branch information
luohf-infinilabs authored and luohoufu committed Dec 9, 2024
1 parent 66461f0 commit daeccd7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import (
"compress/gzip"
"crypto/tls"
"encoding/json"
"github.com/jamiealquiza/tachymeter"
"io"
"net"
"os"
Expand All @@ -41,6 +40,8 @@ import (
"sync/atomic"
"time"

"github.com/jamiealquiza/tachymeter"

log "github.com/cihub/seelog"
"infini.sh/framework/core/conditions"
"infini.sh/framework/core/global"
Expand Down Expand Up @@ -334,11 +335,11 @@ func (v *RequestItem) prepareRequest(config *LoaderConfig, globalCtx util.MapStr
req.ResetBody()

if v.Request.BasicAuth != nil && v.Request.BasicAuth.Username != "" {
req.SetBasicAuth(v.Request.BasicAuth.Username, v.Request.BasicAuth.Password)
req.SetBasicAuth(v.Request.BasicAuth.Username, v.Request.BasicAuth.Password.Get())
} else {
//try use default auth
if config.RunnerConfig.DefaultBasicAuth != nil && config.RunnerConfig.DefaultBasicAuth.Username != "" {
req.SetBasicAuth(config.RunnerConfig.DefaultBasicAuth.Username, config.RunnerConfig.DefaultBasicAuth.Password)
req.SetBasicAuth(config.RunnerConfig.DefaultBasicAuth.Username, config.RunnerConfig.DefaultBasicAuth.Password.Get())
}
}

Expand Down

0 comments on commit daeccd7

Please sign in to comment.