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), Memory: uint64(256),
} }
_, ok := ss.Client.Version.GetVersion(nil) if Host() != "localhost:8080" {
if ok != nil { _, ok := http.Get(fmt.Sprintf("http://%s/version", Host()))
if Host() != "localhost:8080" { if ok != nil {
_, ok := http.Get(fmt.Sprintf("http://%s/version", Host())) panic("Cannot reach remote api for functions")
if ok != nil { }
panic("Cannot reach remote api for functions") } else {
} _, ok := http.Get(fmt.Sprintf("http://%s/version", Host()))
} else { if ok != nil {
_, ok := http.Get(fmt.Sprintf("http://%s/version", Host())) log.Println("Making functions server")
if ok != nil { _, cancel := getServerWithCancel()
log.Println("Making functions server") ss.Cancel = cancel
_, cancel := getServerWithCancel()
ss.Cancel = cancel
}
} }
} }