We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d96028f commit c61de63Copy full SHA for c61de63
network/utils_test.go
@@ -0,0 +1,24 @@
1
+package network
2
+
3
+import (
4
+ "testing"
5
6
+ "github.com/stretchr/testify/assert"
7
+)
8
9
+func TestGetRlimit(t *testing.T) {
10
+ rlimit := GetRLimit()
11
+ assert.Greater(t, rlimit.Cur, uint64(1))
12
+ assert.Greater(t, rlimit.Max, uint64(1))
13
+}
14
15
+func TestGetID(t *testing.T) {
16
+ id := GetID("tcp", "localhost:5432", 1)
17
+ assert.Equal(t, "7b0a81105ebe3e390c617d9757feac3d5ea1a3d5", id)
18
19
20
+func TestResolve(t *testing.T) {
21
+ address, err := Resolve("udp", "localhost:53")
22
+ assert.NoError(t, err)
23
+ assert.Equal(t, "127.0.0.1:53", address)
24
0 commit comments