diff --git a/validate/validate_test.go b/validate/validate_test.go new file mode 100644 index 0000000..db59cf2 --- /dev/null +++ b/validate/validate_test.go @@ -0,0 +1,20 @@ +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) +}