INNER CODE UNIT · Go
TestAddServiceAddFileNotFound
cristianoliveira/ergo · commands/add_service_test.go:41
func TestAddServiceAddFileNotFound(t *testing.T) {
config := buildConfig([]proxy.Service{
proxy.UnsafeNewService("test.dev", "localhost:9999"),
})
service := proxy.UnsafeNewService("newtest.dev", "http://localhost:3333")
config.ConfigFile = "anyfilethatdoesnotexist.here"
command := AddServiceCommand{Service: service}
result, err := command.Execute(config)
if err == nil {
t.Fatalf("Expected to not receive error. Got: %s", result)
}
}