File tree Expand file tree Collapse file tree 1 file changed +3
-18
lines changed
Expand file tree Collapse file tree 1 file changed +3
-18
lines changed Original file line number Diff line number Diff line change @@ -55,22 +55,7 @@ func TestGetPortForTest(t *testing.T) {
5555}
5656
5757func TestPortRangeConstants (t * testing.T ) {
58- t .Run ("minPort is above privileged range" , func (t * testing.T ) {
59- if minPort < 1024 {
60- t .Errorf ("minPort %d should be above 1024 to avoid privileged ports" , minPort )
61- }
62- })
63-
64- t .Run ("maxPort is below max valid port" , func (t * testing.T ) {
65- if maxPort > 65536 {
66- t .Errorf ("maxPort %d should be below 65536" , maxPort )
67- }
68- })
69-
70- t .Run ("port range is reasonable" , func (t * testing.T ) {
71- portRange := maxPort - minPort
72- if portRange < 1000 {
73- t .Errorf ("Port range %d is too small, may cause collisions" , portRange )
74- }
75- })
58+ assert .Greater (t , 1024 , minPort )
59+ assert .Less (t , 65536 , minPort )
60+ assert .Equal (t , 10000 , maxPort - minPort )
7661}
You can’t perform that action at this time.
0 commit comments