Tweaks the error when scripts are disabled.
This will hopefully help people self-serve if they upgrade without accounting for this.
This commit is contained in:
parent
a7842dc688
commit
a0867b5d49
|
@ -1629,7 +1629,7 @@ func (a *Agent) AddCheck(check *structs.HealthCheck, chkType *structs.CheckType,
|
|||
}
|
||||
|
||||
if chkType.IsScript() && !a.config.EnableScriptChecks {
|
||||
return fmt.Errorf("Check types that exec scripts are disabled on this agent")
|
||||
return fmt.Errorf("Scripts are disabled on this agent; to enable, configure 'enable_script_checks' to true")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -822,7 +822,7 @@ func TestAgent_AddCheck_ExecDisable(t *testing.T) {
|
|||
Interval: 15 * time.Second,
|
||||
}
|
||||
err := a.AddCheck(health, chk, false, "")
|
||||
if err == nil || !strings.Contains(err.Error(), "exec scripts are disabled on this agent") {
|
||||
if err == nil || !strings.Contains(err.Error(), "Scripts are disabled on this agent") {
|
||||
t.Fatalf("err: %v", err)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue