func TestGetServices(t *testing.T) { if skip { t.SkipNow() } services, err := balance.GetServices() if err != nil { t.Errorf("Failed to GET services - %v", err) t.FailNow() } if services[0].Id != testService2.Id { t.Errorf("Read service differs from written service") } }
func TestGetServicesNginx(t *testing.T) { if !nginxPrep() { t.SkipNow() } if err := balance.SetServices([]core.Service{testService2}); err != nil { t.Errorf("Failed to SET services - %v", err) t.FailNow() } services, err := balance.GetServices() if err != nil { t.Errorf("Failed to GET services - %v", err) t.FailNow() } if services[0].Id != testService2.Id { t.Errorf("Read service differs from written service") } }