fix failing build count test

This commit is contained in:
Brad Rydzewski 2018-05-02 09:59:05 -07:00
parent 9ffd5ad9e8
commit 4063d29b44

View file

@ -15,6 +15,7 @@
package datastore
import (
"fmt"
"testing"
"github.com/drone/drone/model"
@ -60,6 +61,11 @@ func TestBuilds(t *testing.T) {
g.Assert(build.ID != 0).IsTrue()
g.Assert(build.Number).Equal(1)
g.Assert(build.Commit).Equal("85f8c029b902ed9400bc600bac301a0aadb144ac")
count, err := s.GetBuildCount()
g.Assert(err == nil).IsTrue()
g.Assert(count > 0).IsTrue()
fmt.Println("GOT COUNT", count)
})
g.It("Should Put a Build", func() {
@ -268,12 +274,6 @@ func TestBuilds(t *testing.T) {
g.Assert(builds[0].RepoID).Equal(build2.RepoID)
g.Assert(builds[0].Status).Equal(build2.Status)
})
g.It("Should count Builds", func() {
count, err := s.GetBuildCount()
g.Assert(err == nil).IsTrue()
g.Assert(count > 0).IsTrue()
})
})
}