mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-20 03:33:01 +00:00
fix failing build count test
This commit is contained in:
@@ -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()
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user