Makes all tests pass green again

* Removed a concurrent write condition that was happening while fetching
  BD
* Updated the local test database to match bedetheque.com state
* Note field being highly dynamic removed test from it.
This commit is contained in:
2017-09-05 15:01:43 +02:00
parent 2f526632fe
commit b0eefe8de3
5 changed files with 87 additions and 63 deletions

View File

@@ -100,7 +100,6 @@ func (g *AlbumDescriptionGetter) Get(a *Album) error {
details := map[string][]*goquery.Selection{}
previous := ""
a.Links = map[string]string{}
doc.Find("div.detail-album ul.infos-albums li").Each(func(i int, s *goquery.Selection) {
labelSelection := s.Find("label")
if labelSelection.Size() != 1 {
@@ -124,7 +123,7 @@ func (g *AlbumDescriptionGetter) Get(a *Album) error {
l := linkFromSelection(s.Find("a"))
if len(l.Title) > 0 {
a.Scenarists = append(a.Scenarists, l.Title)
a.Links[l.Title] = l.Target
a.addLink(l.Title, l.Target)
}
}
errors <- nil
@@ -141,7 +140,7 @@ func (g *AlbumDescriptionGetter) Get(a *Album) error {
l := linkFromSelection(s.Find("a"))
if len(l.Title) > 0 {
a.Designers = append(a.Designers, l.Title)
a.Links[l.Title] = l.Target
a.addLink(l.Title, l.Target)
}
}
errors <- nil
@@ -158,7 +157,7 @@ func (g *AlbumDescriptionGetter) Get(a *Album) error {
l := linkFromSelection(s.Find("a"))
if len(l.Title) > 0 {
a.Colorists = append(a.Colorists, l.Title)
a.Links[l.Title] = l.Target
a.addLink(l.Title, l.Target)
}
}
errors <- nil