@@ -29,7 +29,7 @@ func TestAccessWithoutClientCert(t *testing.T) {
2929 // server-name
3030 "node" ))
3131
32- dg , err := testutil .DgraphClientWithCerts (testutil .SockAddr , conf )
32+ dg , err := testutil .DgraphClientWithCerts (testutil .SockAddrLocalhost , conf )
3333 require .NoError (t , err , "Unable to get dgraph client: %v" , err )
3434 require .Error (t , dg .Alter (context .Background (), & api.Operation {DropAll : true }))
3535}
@@ -53,7 +53,7 @@ func TestAccessWithClientCert(t *testing.T) {
5353
5454func TestCurlAccessWithoutClientCert (t * testing.T ) {
5555 curlArgs := []string {
56- "--cacert" , "../tls/ca.crt" , "https://" + testutil .SockAddrHttp + "/alter" ,
56+ "--cacert" , "../tls/ca.crt" , "https://" + testutil .SockAddrHttpLocalhost + "/alter" ,
5757 "-d" , "name: string @index(exact) ." ,
5858 }
5959 testutil .VerifyCurlCmd (t , curlArgs , & testutil.CurlFailureConfig {
@@ -67,7 +67,7 @@ func TestCurlAccessWithClientCert(t *testing.T) {
6767 "--cacert" , "../tls/ca.crt" ,
6868 "--cert" , "../tls/client.acl.crt" ,
6969 "--key" , "../tls/client.acl.key" ,
70- "https://" + testutil .SockAddrHttp + "/alter" ,
70+ "https://" + testutil .SockAddrHttpLocalhost + "/alter" ,
7171 "-d" , "name: string @index(exact) ." ,
7272 }
7373 testutil .VerifyCurlCmd (t , curlArgs , & testutil.CurlFailureConfig {
@@ -98,7 +98,7 @@ func TestGQLAdminHealthWithClientCert(t *testing.T) {
9898 }
9999
100100 healthCheckQuery := []byte (`{"query":"query {\n health {\n status\n }\n}"}` )
101- gqlAdminEndpoint := "https://" + testutil .SockAddrHttp + "/admin"
101+ gqlAdminEndpoint := "https://" + testutil .SockAddrHttpLocalhost + "/admin"
102102 req , err := http .NewRequest ("POST" , gqlAdminEndpoint , bytes .NewBuffer (healthCheckQuery ))
103103 require .NoError (t , err , "Failed to create request : %v" , err )
104104 req .Header .Set ("Content-Type" , "application/json" )
@@ -131,7 +131,7 @@ func TestGQLAdminHealthWithoutClientCert(t *testing.T) {
131131 }
132132
133133 healthCheckQuery := []byte (`{"query":"query {\n health {\n message\n status\n }\n}"}` )
134- gqlAdminEndpoint := "https://" + testutil .SockAddrHttp + "/admin"
134+ gqlAdminEndpoint := "https://" + testutil .SockAddrHttpLocalhost + "/admin"
135135 req , err := http .NewRequest ("POST" , gqlAdminEndpoint , bytes .NewBuffer (healthCheckQuery ))
136136 require .NoError (t , err , "Failed to create request : %v" , err )
137137 req .Header .Set ("Content-Type" , "application/json" )
0 commit comments