1
0
mirror of https://github.com/ManyakRus/starter.git synced 2025-11-25 23:02:22 +02:00

сделал CheckPort()

This commit is contained in:
Nikitin Aleksandr
2023-12-26 16:42:53 +03:00
parent 0c5ee45514
commit 3c32dfb9ad
29 changed files with 183 additions and 182 deletions

View File

@@ -6,7 +6,7 @@ import (
//log "github.com/sirupsen/logrus"
"github.com/ManyakRus/starter/config"
"github.com/ManyakRus/starter/config_main"
"github.com/ManyakRus/starter/contextmain"
"github.com/ManyakRus/starter/micro"
@@ -18,7 +18,7 @@ func TestConnect_err(t *testing.T) {
//Connect_Panic()
//ProgramDir := micro.ProgramDir_Common()
config.LoadEnv()
config_main.LoadEnv()
err := Connect_err()
if err != nil {
t.Error("TestConnect error: ", err)
@@ -32,7 +32,7 @@ func TestConnect_err(t *testing.T) {
func TestIsClosed(t *testing.T) {
//ProgramDir := micro.ProgramDir_Common()
config.LoadEnv()
config_main.LoadEnv()
err := Connect_err()
if err != nil {
@@ -53,7 +53,7 @@ func TestIsClosed(t *testing.T) {
func TestReconnect(t *testing.T) {
//ProgramDir := micro.ProgramDir_Common()
config.LoadEnv()
config_main.LoadEnv()
err := Connect_err()
if err != nil {
t.Error("TestIsClosed Connect() error: ", err)
@@ -84,7 +84,7 @@ func TestWaitStop(t *testing.T) {
func TestStartDB(t *testing.T) {
//ProgramDir := micro.ProgramDir_Common()
config.LoadEnv()
config_main.LoadEnv()
StartDB()
err := CloseConnection_err()
if err != nil {
@@ -94,7 +94,7 @@ func TestStartDB(t *testing.T) {
func TestConnect(t *testing.T) {
//ProgramDir := micro.ProgramDir_Common()
config.LoadEnv()
config_main.LoadEnv()
Connect()
CloseConnection()
@@ -102,7 +102,7 @@ func TestConnect(t *testing.T) {
func TestConnect_WithApplicationName_err(t *testing.T) {
config.LoadEnv()
config_main.LoadEnv()
err := Connect_WithApplicationName_err("test_starter_postgres_pgx")
if err != nil {
t.Error("TestConnect_WithApplicationName_err error: ", err)