package config import ( "excel_export/pkg" "fmt" "github.com/stretchr/testify/assert" "os" "testing" ) func TestLoadConfig(t *testing.T) { path, err := os.Getwd() assert.Nil(t, err) path = path + "/../../config/" config := LoadConfig(path) zltx, err := config.GetSystem("营销系统") assert.Nil(t, err) fmt.Println(t) assert.Equal(t, "renzhiyuan:renzhiyuan@123@tcp(rr-2vcszlj05siu227f9qo.mysql.cn-chengdu.rds.aliyuncs.com:3306)/market?charset=utf8mb4&parseTime=True", zltx.Db) order, err := zltx.GetJob("订单导出") assert.Nil(t, err) assert.Len(t, order.Tasks, 2) assert.False(t, order.Tasks[0].Timestamp) } func TestProcess(t *testing.T) { pkg.MissionLog("market", "order", "87987987979798", "", 0, "") }