Updating API tests

This commit is contained in:
Denis Makogon
2017-08-18 21:47:29 +03:00
parent 091b035921
commit a461f0bba0

View File

@@ -133,20 +133,17 @@ func SetupDefaultSuite() *SuiteSetup {
Memory: uint64(256),
}
_, ok := ss.Client.Version.GetVersion(nil)
if ok != nil {
if Host() != "localhost:8080" {
_, ok := http.Get(fmt.Sprintf("http://%s/version", Host()))
if ok != nil {
panic("Cannot reach remote api for functions")
}
} else {
_, ok := http.Get(fmt.Sprintf("http://%s/version", Host()))
if ok != nil {
log.Println("Making functions server")
_, cancel := getServerWithCancel()
ss.Cancel = cancel
}
if Host() != "localhost:8080" {
_, ok := http.Get(fmt.Sprintf("http://%s/version", Host()))
if ok != nil {
panic("Cannot reach remote api for functions")
}
} else {
_, ok := http.Get(fmt.Sprintf("http://%s/version", Host()))
if ok != nil {
log.Println("Making functions server")
_, cancel := getServerWithCancel()
ss.Cancel = cancel
}
}