genofire/hs_monolith
genofire
/
hs_monolith
Archived
1
0
Fork 0

[Fix] first try to fix the build error

This commit is contained in:
mlabusch 2017-05-05 10:44:19 +02:00
parent 0fef88f07e
commit c9e944d9f3
2 changed files with 4 additions and 4 deletions

View File

@ -33,7 +33,7 @@ func ProductExists(id int64) (bool, error) {
}
url := fmt.Sprintf(ProductURL, id)
log.Log.WithField("url", url).Info("exists product?")
log.Log.WithField("url", url).Info("does the product exist?")
res, err := http.Get(url)
if err != nil {
return false, err

View File

@ -20,19 +20,19 @@ func TestProductExists(t *testing.T) {
}
go srv.ListenAndServe()
ok, err := ProductExists(3)
ok, err := ProductExists(6)
assert.True(ok)
assert.NoError(err)
// test cache
ok, err = ProductExists(3)
ok, err = ProductExists(6)
assert.True(ok)
assert.NoError(err)
productExistCache = make(map[int64]boolMicroServiceCache)
ProductURL = "http://localhost:8081/api-test/product/%d/"
ok, err = ProductExists(3)
ok, err = ProductExists(6)
assert.Error(err)
srv.Close()