package cacheservice

import (
	"go-admin/common/helper"
	"testing"

	"gorm.io/driver/mysql"
	"gorm.io/gorm"
)

func TestGetReverseSetting(t *testing.T) {
	dsn := "root:123456@tcp(127.0.0.1:3306)/go_exchange_single?charset=utf8mb4&parseTime=True&loc=Local&timeout=1000ms"
	db, _ := gorm.Open(mysql.Open(dsn), &gorm.Config{})
	helper.InitDefaultRedis("127.0.0.1:6379", "", 2)

	setting, err := GetReverseSetting(db)

	if err != nil {
		t.Error(err)
	}

	t.Log(setting)
}
