app/attribute/attribute_test.go

23 lines
424 B
Go
Raw Normal View History

2021-12-18 18:44:34 +00:00
package attribute
import (
"fmt"
"testing"
"github.com/spf13/viper"
"kumoly.io/kumoly/app/store"
)
func TestAttr(t *testing.T) {
viper.Set("data", "work")
viper.Set("db.type", "sqlite")
store.Setup()
Init()
fmt.Println(Add("test", "", "1"))
fmt.Println(Add("test1", "", "2"))
fmt.Println(Add("test2", "", "2"))
fmt.Println(Add("test3", "", "2"))
fmt.Println(Set("test", "reset"))
fmt.Println(Get("test"))
}