@@ -29,7 +29,7 @@ func TestAccessWithoutClientCert(t *testing.T) {
29
29
// server-name
30
30
"node" ))
31
31
32
- dg , err := testutil .DgraphClientWithCerts (testutil .SockAddr , conf )
32
+ dg , err := testutil .DgraphClientWithCerts (testutil .SockAddrLocalhost , conf )
33
33
require .NoError (t , err , "Unable to get dgraph client: %v" , err )
34
34
require .Error (t , dg .Alter (context .Background (), & api.Operation {DropAll : true }))
35
35
}
@@ -53,7 +53,7 @@ func TestAccessWithClientCert(t *testing.T) {
53
53
54
54
func TestCurlAccessWithoutClientCert (t * testing.T ) {
55
55
curlArgs := []string {
56
- "--cacert" , "../tls/ca.crt" , "https://" + testutil .SockAddrHttp + "/alter" ,
56
+ "--cacert" , "../tls/ca.crt" , "https://" + testutil .SockAddrHttpLocalhost + "/alter" ,
57
57
"-d" , "name: string @index(exact) ." ,
58
58
}
59
59
testutil .VerifyCurlCmd (t , curlArgs , & testutil.CurlFailureConfig {
@@ -67,7 +67,7 @@ func TestCurlAccessWithClientCert(t *testing.T) {
67
67
"--cacert" , "../tls/ca.crt" ,
68
68
"--cert" , "../tls/client.acl.crt" ,
69
69
"--key" , "../tls/client.acl.key" ,
70
- "https://" + testutil .SockAddrHttp + "/alter" ,
70
+ "https://" + testutil .SockAddrHttpLocalhost + "/alter" ,
71
71
"-d" , "name: string @index(exact) ." ,
72
72
}
73
73
testutil .VerifyCurlCmd (t , curlArgs , & testutil.CurlFailureConfig {
@@ -98,7 +98,7 @@ func TestGQLAdminHealthWithClientCert(t *testing.T) {
98
98
}
99
99
100
100
healthCheckQuery := []byte (`{"query":"query {\n health {\n status\n }\n}"}` )
101
- gqlAdminEndpoint := "https://" + testutil .SockAddrHttp + "/admin"
101
+ gqlAdminEndpoint := "https://" + testutil .SockAddrHttpLocalhost + "/admin"
102
102
req , err := http .NewRequest ("POST" , gqlAdminEndpoint , bytes .NewBuffer (healthCheckQuery ))
103
103
require .NoError (t , err , "Failed to create request : %v" , err )
104
104
req .Header .Set ("Content-Type" , "application/json" )
@@ -131,7 +131,7 @@ func TestGQLAdminHealthWithoutClientCert(t *testing.T) {
131
131
}
132
132
133
133
healthCheckQuery := []byte (`{"query":"query {\n health {\n message\n status\n }\n}"}` )
134
- gqlAdminEndpoint := "https://" + testutil .SockAddrHttp + "/admin"
134
+ gqlAdminEndpoint := "https://" + testutil .SockAddrHttpLocalhost + "/admin"
135
135
req , err := http .NewRequest ("POST" , gqlAdminEndpoint , bytes .NewBuffer (healthCheckQuery ))
136
136
require .NoError (t , err , "Failed to create request : %v" , err )
137
137
req .Header .Set ("Content-Type" , "application/json" )
0 commit comments