common/validate/validate_test.go
2024-12-02 11:58:23 +03:00

21 lines
515 B
Go

package validate
import (
"gitea.pena/PenaSide/common/mongo"
"github.com/stretchr/testify/assert"
"testing"
)
func TestValidateMongo(t *testing.T) {
err := ValidateMongo(mongo.Configuration{
URL: "mongodb://localhost:27017,localhost:27018,localhost:27019/?replicaSet=rs0&readPreference=primary&ssl=false",
DatabaseName: "admin",
})
assert.NoError(t, err)
}
func TestValidateTG(t *testing.T) {
err := ValidateTgToken("7127966184:AAG1steOCH4wDvHRe9QcsXJPS4dWRyRYsqg")
assert.NoError(t, err)
}