INNER CODE UNIT · Go
TestUrlCommand
cristianoliveira/ergo · main_test.go:275
func TestUrlCommand(t *testing.T) {
commandName := "URLCommand"
services := map[string]proxy.Service{
"foo": proxy.UnsafeNewService("foo", "http://localhost:3000"),
"bar": proxy.UnsafeNewService("bar", "http://localhost:5000"),
}
t.Run("when there is the service", func(tt *testing.T) {
expectedOutput := "http://foo.dev"
args := []string{"ergo", "url", "foo"}
command, argconfig := prepareSubCommand(args)
config := proxy.NewConfig()
config.OverrideBy(argconfig)
config.Services = services