aboutsummaryrefslogtreecommitdiffstats
path: root/client/go/internal/curl/curl_test.go
diff options
context:
space:
mode:
authorArne Juul <arnej@yahooinc.com>2023-03-02 20:00:11 +0000
committerArne Juul <arnej@yahooinc.com>2023-03-02 20:05:43 +0000
commit66d685830373c716fdf740c3373706056b93ad65 (patch)
tree159ea158fd641aeb19d97f1010d2af4278ba34c0 /client/go/internal/curl/curl_test.go
parente8843502782cf63a490fe9cd45c43329d509b0f5 (diff)
use common shell quoting utilityarnej/use-our-shell-quote
* only suited for printable ascii * always single-quotes if quoting needed * may quote more than strictly necessary
Diffstat (limited to 'client/go/internal/curl/curl_test.go')
-rw-r--r--client/go/internal/curl/curl_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/client/go/internal/curl/curl_test.go b/client/go/internal/curl/curl_test.go
index 448e1e5199f..a8ccade3866 100644
--- a/client/go/internal/curl/curl_test.go
+++ b/client/go/internal/curl/curl_test.go
@@ -17,7 +17,7 @@ func TestPost(t *testing.T) {
c.WithBodyFile("file.json")
c.Header("Content-Type", "application/json")
- assert.Equal(t, "curl --key key.pem --cert cert.pem -X POST -H 'Content-Type: application/json' --data-binary @file.json https://example.com", c.String())
+ assert.Equal(t, "curl --key key.pem --cert cert.pem -X POST -H 'Content-Type: application/json' --data-binary '@file.json' https://example.com", c.String())
}
func TestGet(t *testing.T) {
@@ -30,7 +30,7 @@ func TestGet(t *testing.T) {
c.Param("yql", "select * from sources * where title contains 'foo';")
c.Param("hits", "5")
- assert.Equal(t, `curl --key key.pem --cert cert.pem https://example.com\?hits=5\&yql=select+%2A+from+sources+%2A+where+title+contains+%27foo%27%3B`, c.String())
+ assert.Equal(t, `curl --key key.pem --cert cert.pem 'https://example.com?hits=5&yql=select+%2A+from+sources+%2A+where+title+contains+%27foo%27%3B'`, c.String())
}
func TestRawArgs(t *testing.T) {