github.com/15mga/kiwi@v0.0.2-0.20240324021231-b95d5c3ac751/util/dynamo/dynamo_test.go (about)

     1  package dynamo
     2  
     3  import (
     4  	"github.com/15mga/kiwi"
     5  	"github.com/15mga/kiwi/log"
     6  	"github.com/15mga/kiwi/util"
     7  	"testing"
     8  )
     9  
    10  func TestConn(t *testing.T) {
    11  	kiwi.SetLogger(
    12  		log.NewStd(
    13  			log.StdLogLvl(kiwi.LvlToMask(kiwi.TestLevels...)),
    14  		),
    15  	)
    16  	err := ConnLocal("http://192.168.3.35:8000")
    17  	if err != nil {
    18  		kiwi.Error(err)
    19  		return
    20  	}
    21  	exist, err := IsTableExist("account")
    22  	if err != nil {
    23  		kiwi.Error(err)
    24  		return
    25  	}
    26  	kiwi.Debug("account table", util.M{
    27  		"exist": exist,
    28  	})
    29  }