23 lines
424 B
Go
23 lines
424 B
Go
|
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"))
|
||
|
}
|