opscache_test.go 828 B

1234567891011121314151617181920212223242526272829303132
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestOpsMemcaches(t *testing.T) {
  8. convey.Convey("get OpsMemcaches", t, func(ctx convey.C) {
  9. ctx.Convey("When http response code != 0", func(ctx convey.C) {
  10. mcs, err := d.OpsMemcaches(context.Background())
  11. ctx.Convey("Then err should not be nil", func(ctx convey.C) {
  12. ctx.So(err, convey.ShouldBeNil)
  13. ctx.So(mcs, convey.ShouldNotBeNil)
  14. })
  15. })
  16. })
  17. }
  18. func TestOpsRediss(t *testing.T) {
  19. convey.Convey("get OpsRediss", t, func(ctx convey.C) {
  20. ctx.Convey("When http response code != 0", func(ctx convey.C) {
  21. mcs, err := d.OpsRediss(context.Background())
  22. ctx.Convey("Then err should not be nil", func(ctx convey.C) {
  23. ctx.So(err, convey.ShouldBeNil)
  24. ctx.So(mcs, convey.ShouldNotBeNil)
  25. })
  26. })
  27. })
  28. }