@@ -26,6 +26,7 @@ func TestInitCurlCmd(t *testing.T) {
2626 gotexp func () (interface {}, interface {})
2727 }{
2828 // Common flags
29+ "file" : {[]string {"--file" , "file.txt" }, func () (interface {}, interface {}) { return fileOut , "file.txt" }},
2930 "from" : {[]string {"--from" , "Europe" }, func () (interface {}, interface {}) { return from , "Europe" }},
3031 "nodeid" : {[]string {"--nodeid" , "1,2,3" }, func () (interface {}, interface {}) { return nodeIDs , []int {1 , 2 , 3 } }},
3132 "json" : {[]string {"--json" }, func () (interface {}, interface {}) { return outputJSON , true }},
@@ -49,7 +50,7 @@ func TestInitCurlCmd(t *testing.T) {
4950 t .Fatal ("expected flag; got nil" )
5051 }
5152
52- got , exp := tc .gotexp ();
53+ got , exp := tc .gotexp ()
5354 if reflect .DeepEqual (got , exp ) == false {
5455 t .Fatalf ("expected %v; got %v" , exp , got )
5556 }
@@ -81,7 +82,7 @@ func TestRunCurlResolve(t *testing.T) {
8182 }
8283 for name , tc := range testCases {
8384 t .Run (name , func (t * testing.T ) {
84- runCurl (c , "example.com" , tc .head , tc .insecure , tc .http2 , tc .from , tc .nodeIDs , 12 )
85+ runCurl (c , "example.com" , tc .head , tc .insecure , tc .http2 , tc .from , tc .nodeIDs , 12 , "file.txt" )
8586 if got , exp := tr .req .URL .Path , "/run/curl" ; got != exp {
8687 t .Fatalf ("expected %v; got %v" , exp , got )
8788 }
0 commit comments