oversea_test.go 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. package manager
  2. import (
  3. "context"
  4. . "github.com/smartystreets/goconvey/convey"
  5. "testing"
  6. )
  7. func Test_UpArea(t *testing.T) {
  8. Convey("UpArea", t, WithDao(func(d *Dao) {
  9. _, err := d.UpPolicyRelation(context.TODO(), 1212121, 1)
  10. So(err, ShouldBeNil)
  11. }))
  12. }
  13. func Test_PolicyGroup(t *testing.T) {
  14. Convey("PolicyGroup", t, WithDao(func(d *Dao) {
  15. _, _, err := d.PolicyGroups(context.TODO(), 0, 0, 0, 0, 0, 0, "", "")
  16. So(err, ShouldBeNil)
  17. }))
  18. }
  19. func Test_PolicyRelation(t *testing.T) {
  20. Convey("PolicyRelation", t, WithDao(func(d *Dao) {
  21. _, err := d.PolicyRelation(context.TODO(), 1212121)
  22. So(err, ShouldBeNil)
  23. }))
  24. }
  25. func Test_PolicyGroupsByIds(t *testing.T) {
  26. Convey("PolicyGroupsByIds", t, WithDao(func(d *Dao) {
  27. _, err := d.PolicyGroupsByIds(context.TODO(), []int64{1212121})
  28. So(err, ShouldBeNil)
  29. }))
  30. }
  31. func Test_ArchiveGroups(t *testing.T) {
  32. Convey("ArchiveGroups", t, WithDao(func(d *Dao) {
  33. _, err := d.ArchiveGroups(context.TODO(), 1212121)
  34. So(err, ShouldBeNil)
  35. }))
  36. }
  37. func Test_PolicyItems(t *testing.T) {
  38. Convey("ItemsByGroup", t, WithDao(func(d *Dao) {
  39. _, err := d.PolicyItems(context.Background(), 1)
  40. So(err, ShouldBeNil)
  41. }))
  42. }
  43. func Test_ZoneIDs(t *testing.T) {
  44. Convey("ZoneIDs", t, WithDao(func(d *Dao) {
  45. _, err := d.ZoneIDs(context.TODO(), []int64{1212121})
  46. So(err, ShouldBeNil)
  47. }))
  48. }