From 89acf3b93b0e3c0b645ffa61d4ba80b7e51de67a Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Thu, 22 Sep 2016 11:15:25 -0700 Subject: [PATCH] fixing path escaping in JSON for TestConfigFileTLSCanBeRelativeToConfigOrAbsolute Signed-off-by: David Lawrence (github: endophage) --- cmd/notary/main_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/notary/main_test.go b/cmd/notary/main_test.go index 5b9f916e7..3d8541ec4 100644 --- a/cmd/notary/main_test.go +++ b/cmd/notary/main_test.go @@ -8,6 +8,7 @@ import ( "net/http/httptest" "os" "path/filepath" + "strconv" "strings" "testing" "time" @@ -343,10 +344,10 @@ func TestConfigFileTLSCanBeRelativeToConfigOrAbsolute(t *testing.T) { "remote_server": { "url": "%s", "root_ca": "root-ca.crt", - "tls_client_cert": "%s", + "tls_client_cert": %s, "tls_client_key": "notary-server.key" } - }`, s.URL, filepath.Join(tempDir, "notary-server.crt")) + }`, s.URL, strconv.Quote(filepath.Join(tempDir, "notary-server.crt"))) configFile.Close() // copy the certs to be relative to the config directory