INNER CODE UNIT · Go
func
cristianoliveira/ergo · main_test.go:95
func (r *TestRunner) Run(command string, args ...string) ([]byte, error) {
return []byte(""), nil
}
func TestListCommand(t *testing.T) {
services := map[string]proxy.Service{
"foo": proxy.UnsafeNewService("foo", "http://localhost:3000"),
"bar": proxy.UnsafeNewService("bar", "http://localhost:5000"),
}
t.Run("list services", func(tt *testing.T) {
args := []string{"ergo", "list"}
expectedOutput := "Ergo Proxy current list"
command, config := prepareSubCommand(args)
config.Services = services
if command == nil {