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
tlsVerification=flag.Bool("tls-verification", true, "turn on/off tls verification for outgoing requests (will not try to verify certificates) - defaults to true")
81
81
82
-
databasePath=flag.String("db-dir", "", "database location - supply it if you want to provide specific to database (will be created there if it doesn't exist)")
82
+
databasePath=flag.String("db-path", "", "database location - supply it to provide specific database location (will be created there if it doesn't exist)")
83
83
database=flag.String("db", "boltdb", "Persistance storage to use - 'boltdb' or 'memory' which will not write anything to disk")
84
84
)
85
85
@@ -198,7 +198,7 @@ func main() {
198
198
cfg.Middleware=*middleware
199
199
200
200
// setting default mode
201
-
mode:=hv.VirtualizeMode
201
+
mode:=hv.SimulateMode
202
202
203
203
if*capture {
204
204
mode=hv.CaptureMode
@@ -232,8 +232,8 @@ func main() {
232
232
cfg.SetMode(mode)
233
233
234
234
// disabling authentication if no-auth for auth disabled env variable
235
-
if!cfg.AuthEnabled||*authDisabled {
236
-
cfg.AuthEnabled=false
235
+
if(*authEnabled) {
236
+
cfg.AuthEnabled=true
237
237
}
238
238
239
239
// disabling tls verification if flag or env variable is set to 'false' (defaults to true)
@@ -319,6 +319,20 @@ func main() {
319
319
}
320
320
}
321
321
322
+
// importing records if environment variable is set
323
+
ev:=os.Getenv(hv.HoverflyImportRecordsEV)
324
+
ifev!="" {
325
+
err:=hoverfly.Import(ev)
326
+
iferr!=nil {
327
+
log.WithFields(log.Fields{
328
+
"error": err.Error(),
329
+
"import": ev,
330
+
}).Fatal("Environment variable for importing was set but failed to import this resource")
0 commit comments