stats_test.go 603 B

123456789101112131415161718192021222324252627
  1. package sqlstore
  2. import (
  3. "testing"
  4. m "github.com/grafana/grafana/pkg/models"
  5. . "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestStatsDataAccess(t *testing.T) {
  8. Convey("Testing Stats Data Access", t, func() {
  9. InitTestDB(t)
  10. Convey("Get system stats should not results in error", func() {
  11. query := m.GetSystemStatsQuery{}
  12. err := GetSystemStats(&query)
  13. So(err, ShouldBeNil)
  14. })
  15. Convey("Get system user count stats should not results in error", func() {
  16. query := m.GetSystemUserCountStatsQuery{}
  17. err := GetSystemUserCountStats(&query)
  18. So(err, ShouldBeNil)
  19. })
  20. })
  21. }