mirror of
https://github.com/tengge1/ShadowEditor.git
synced 2026-01-25 15:08:11 +00:00
30 lines
450 B
Go
30 lines
450 B
Go
package context
|
|
|
|
import "testing"
|
|
|
|
func TestCreate(t *testing.T) {
|
|
err := Create("../config.toml")
|
|
if err != nil {
|
|
t.Error(err)
|
|
return
|
|
}
|
|
t.Log(Config)
|
|
Logger.Info("Some info from context_test.go")
|
|
|
|
mong, err := Mongo()
|
|
if err != nil {
|
|
t.Error(err)
|
|
return
|
|
}
|
|
|
|
collectionNames, err := mong.ListCollectionNames()
|
|
if err != nil {
|
|
t.Error(err)
|
|
return
|
|
}
|
|
|
|
for _, collectionName := range collectionNames {
|
|
t.Log(collectionName)
|
|
}
|
|
}
|