CasaOS/service/health_test.go
Tiger Wang 8e1b9b82c1
add /v2/casaos/health/ports to get ports in use (#1023)
Signed-off-by: Tiger Wang <tigerwang@outlook.com>
2023-04-24 16:10:15 -04:00

18 lines
328 B
Go

package service_test
import (
"testing"
"github.com/IceWhaleTech/CasaOS/service"
"github.com/stretchr/testify/assert"
)
func TestPorts(t *testing.T) {
service := service.NewHealthService()
tcpPorts, udpPorts, err := service.Ports()
assert.NoError(t, err)
assert.NotEmpty(t, tcpPorts)
assert.NotEmpty(t, udpPorts)
}