order_no_test.go 824 B

123456789101112131415161718192021222324252627282930313233343536
  1. package domainservice
  2. import (
  3. "Cold_Logistic/internal/pkg/common/global"
  4. "Cold_Logistic/internal/pkg/common/options"
  5. "Cold_Logistic/internal/pkg/utils/contextutil"
  6. "context"
  7. "gogs.baozhida.cn/Cold_Logistic_libs/pkg/contrib/database/myredis"
  8. "testing"
  9. )
  10. func init() {
  11. options.OptInstance = &options.Options{
  12. Redis: &myredis.RedisOption{
  13. Enable: true,
  14. Addr: "192.168.11.23:6379",
  15. DB: 11,
  16. },
  17. }
  18. global.CommonConnectRepoInst = global.NewCommonConnectsRepo(options.OptInstance)
  19. global.CommonConnectRepoInst.Redis = myredis.InitRedis(options.OptInstance.Redis)
  20. }
  21. func TestGenOrderNo(t *testing.T) {
  22. ctx := contextutil.MakeTraceCtx(context.Background())
  23. if err := GenOrderNo(ctx); err != nil {
  24. t.Errorf("GenOrderNo() error = %v", err)
  25. return
  26. }
  27. }
  28. func TestGenOrderNo_Sub(t *testing.T) {
  29. }