File tree Expand file tree Collapse file tree 3 files changed +10
-9
lines changed
Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ func HttpbinService() *Service {
5353 return & Service {
5454 Name : HttpbinServiceName ,
5555 Image : Image ,
56- Command : "test httpbin" ,
56+ Command : [] string { "test" , " httpbin"} ,
5757 Environment : map [string ]string {
5858 "FORWARDER_API_ADDRESS" : ":10000" ,
5959 },
@@ -64,7 +64,7 @@ func GRPCTestService() *Service {
6464 s := & Service {
6565 Name : GRPCTestServiceName ,
6666 Image : Image ,
67- Command : "test grpc" ,
67+ Command : [] string { "test" , " grpc"} ,
6868 Environment : map [string ]string {
6969 "FORWARDER_ADDRESS" : ":1443" ,
7070 },
Original file line number Diff line number Diff line change 77package main
88
99import (
10- "bytes"
1110 "context"
1211 "flag"
1312 "fmt"
@@ -128,17 +127,19 @@ func testService(s *setup.Setup) *compose.Service {
128127 run = s .Run
129128 }
130129
131- var cmd bytes. Buffer
130+ var cmd [] string
132131 if * args .debug {
133- cmd . WriteString ( "-test.v " )
132+ cmd = append ( cmd , "-test.v" )
134133 }
135- fmt .Fprintf (& cmd , "-test.run %q -test.shuffle on -services %s" ,
136- run , strings .Join (maps .Keys (s .Compose .Services ), "," ))
134+ cmd = append (cmd ,
135+ "-test.run" , run ,
136+ "-test.shuffle" , "on" ,
137+ "-services" , strings .Join (maps .Keys (s .Compose .Services ), "," ))
137138
138139 c := & compose.Service {
139140 Name : setup .TestServiceName ,
140141 Image : "forwarder-e2e" ,
141- Command : cmd . String () ,
142+ Command : cmd ,
142143 Environment : map [string ]string {
143144 "GOMAXPROCS" : "1" ,
144145 },
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ type ServiceNetwork struct {
1818type Service struct {
1919 Name string `yaml:"-"`
2020 Image string `yaml:"image,omitempty"`
21- Command string `yaml:"command,omitempty"`
21+ Command [] string `yaml:"command,omitempty"`
2222 Environment map [string ]string `yaml:"environment,omitempty"`
2323 Ports []string `yaml:"ports,omitempty"`
2424 Volumes []string `yaml:"volumes,omitempty"`
You can’t perform that action at this time.
0 commit comments