Add server option to unbound plugin (#3713)

This commit is contained in:
Fred Cox
2018-02-21 02:06:13 +02:00
committed by Daniel Nelson
parent f4fa05530a
commit 80d9417315
4 changed files with 45 additions and 7 deletions

View File

@@ -12,8 +12,8 @@ import (
var TestTimeout = internal.Duration{Duration: time.Second}
func UnboundControl(output string, Timeout internal.Duration, useSudo bool) func(string, internal.Duration, bool) (*bytes.Buffer, error) {
return func(string, internal.Duration, bool) (*bytes.Buffer, error) {
func UnboundControl(output string, Timeout internal.Duration, useSudo bool, Server string) func(string, internal.Duration, bool, string) (*bytes.Buffer, error) {
return func(string, internal.Duration, bool, string) (*bytes.Buffer, error) {
return bytes.NewBuffer([]byte(output)), nil
}
}
@@ -21,7 +21,7 @@ func UnboundControl(output string, Timeout internal.Duration, useSudo bool) func
func TestParseFullOutput(t *testing.T) {
acc := &testutil.Accumulator{}
v := &Unbound{
run: UnboundControl(fullOutput, TestTimeout, true),
run: UnboundControl(fullOutput, TestTimeout, true, ""),
}
err := v.Gather(acc)