From f2893fbf97728716e189f49bfdc7d0e81b0be2a2 Mon Sep 17 00:00:00 2001 From: Pasha Date: Mon, 2 Dec 2024 11:58:23 +0300 Subject: [PATCH] move validate tests from customer --- validate/validate_test.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 validate/validate_test.go 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) +}