From 9c9c3ce141a57a2b82bad6911861da08d6b156ec Mon Sep 17 00:00:00 2001 From: niusmallnan Date: Mon, 5 Mar 2018 16:29:31 +0800 Subject: [PATCH] Fix go test for ssh port and listen_address config --- config/schema.go | 4 +++- config/validate_test.go | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/config/schema.go b/config/schema.go index f451a630..da3ab128 100644 --- a/config/schema.go +++ b/config/schema.go @@ -148,7 +148,9 @@ var schema = `{ "properties": { "keys": {"type": "object"}, - "daemon": {"type": "boolean"} + "daemon": {"type": "boolean"}, + "port": {"type": "integer"}, + "listen_address": {"type": "string"} } }, diff --git a/config/validate_test.go b/config/validate_test.go index 32a2456e..0c975907 100644 --- a/config/validate_test.go +++ b/config/validate_test.go @@ -16,6 +16,7 @@ func testValidate(t *testing.T, cfg []byte, contains string) { t.Fatal(err) } if contains == "" && len(validationErrors.Errors()) != 0 { + fmt.Printf("validationErrors: %v", validationErrors.Errors()) t.Fail() } if !strings.Contains(fmt.Sprint(validationErrors.Errors()), contains) {