INNER CODE UNIT · Go
TestAddCommand
cristianoliveira/ergo · main_test.go:356
func TestAddCommand(t *testing.T) {
t.Run("success", func(tt *testing.T) {
services := map[string]proxy.Service{
"foo": proxy.UnsafeNewService("foo", "http://localhost:3000"),
"bar": proxy.UnsafeNewService("bar", "http://localhost:5000"),
}
tmpfile, err := ioutil.TempFile("", "testaddservice")
if err != nil {
t.Fatalf("Error creating tempfile %s", err.Error())
}
cases := []struct {
title string
args []string
commandName string
output string
err error