1
0
mirror of https://github.com/ManyakRus/starter.git synced 2025-11-28 23:20:10 +02:00
Files
starter/port_checker/port_checker_test.go

25 lines
351 B
Go
Raw Normal View History

2023-12-26 16:42:53 +03:00
package port_checker
2023-03-17 11:20:09 +03:00
import (
"testing"
"time"
)
2023-12-26 16:42:53 +03:00
func TestCheckPort(t *testing.T) {
2023-03-17 11:20:09 +03:00
IP := "10.1.9.151"
Port := "26500"
TimeStart := time.Now()
2023-12-26 16:42:53 +03:00
err := CheckPort_err(IP, Port)
2023-03-17 11:20:09 +03:00
2023-04-25 17:28:10 +03:00
t.Log("Прошло время: ", time.Since(TimeStart))
2023-03-17 11:20:09 +03:00
if err != nil {
2023-12-26 16:42:53 +03:00
t.Error("TestCheckPort() error: ", err)
2023-03-17 11:20:09 +03:00
} else {
2023-12-26 16:42:53 +03:00
t.Log("TestCheckPort() OK.")
2023-03-17 11:20:09 +03:00
}
}