monitor_test.go 647 B

12345678910111213141516171819202122232425262728293031
  1. package redis
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestRedisMoniRuleStats(t *testing.T) {
  8. var (
  9. c = context.TODO()
  10. )
  11. convey.Convey("MoniRuleStats", t, func(ctx convey.C) {
  12. _, err := d.MoniRuleStats(c, 1, 0, 0)
  13. ctx.Convey("Then err should be nil.", func(ctx convey.C) {
  14. ctx.So(err, convey.ShouldBeNil)
  15. })
  16. })
  17. }
  18. func TestRedisMoniRuleOids(t *testing.T) {
  19. var (
  20. c = context.TODO()
  21. )
  22. convey.Convey("MoniRuleOids", t, func(ctx convey.C) {
  23. _, err := d.MoniRuleOids(c, 1, 0, 0)
  24. ctx.Convey("Then err should be nil.", func(ctx convey.C) {
  25. ctx.So(err, convey.ShouldBeNil)
  26. })
  27. })
  28. }