fix failing build count test
This commit is contained in:
parent
9ffd5ad9e8
commit
4063d29b44
1 changed files with 6 additions and 6 deletions
|
@ -15,6 +15,7 @@
|
||||||
package datastore
|
package datastore
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/drone/drone/model"
|
"github.com/drone/drone/model"
|
||||||
|
@ -60,6 +61,11 @@ func TestBuilds(t *testing.T) {
|
||||||
g.Assert(build.ID != 0).IsTrue()
|
g.Assert(build.ID != 0).IsTrue()
|
||||||
g.Assert(build.Number).Equal(1)
|
g.Assert(build.Number).Equal(1)
|
||||||
g.Assert(build.Commit).Equal("85f8c029b902ed9400bc600bac301a0aadb144ac")
|
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() {
|
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].RepoID).Equal(build2.RepoID)
|
||||||
g.Assert(builds[0].Status).Equal(build2.Status)
|
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()
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue