From f7d64d8e8592951ed5a0f0b06db608bc73786ea2 Mon Sep 17 00:00:00 2001 From: Wolfy-J Date: Sun, 23 Sep 2018 14:00:08 +0300 Subject: - new directory structure - singular exception - starting exception deprecation --- service/http/config_test.go | 10 +++++----- service/http/handler_test.go | 36 ++++++++++++++++++------------------ service/http/rpc_test.go | 6 +++--- service/http/service_test.go | 22 +++++++++++----------- service/http/uploads_test.go | 8 ++++---- service/static/service_test.go | 30 +++++++++++++++--------------- 6 files changed, 56 insertions(+), 56 deletions(-) (limited to 'service') diff --git a/service/http/config_test.go b/service/http/config_test.go index 2e3fe731..662939f3 100644 --- a/service/http/config_test.go +++ b/service/http/config_test.go @@ -39,7 +39,7 @@ func Test_Config_Valid(t *testing.T) { Forbid: []string{".go"}, }, Workers: &roadrunner.ServerConfig{ - Command: "php php-src/tests/client.php echo pipes", + Command: "php tests/client.php echo pipes", Relay: "pipes", Pool: &roadrunner.Config{ NumWorkers: 1, @@ -58,7 +58,7 @@ func Test_Config_NoUploads(t *testing.T) { Address: ":8080", MaxRequest: 1024, Workers: &roadrunner.ServerConfig{ - Command: "php php-src/tests/client.php echo pipes", + Command: "php tests/client.php echo pipes", Relay: "pipes", Pool: &roadrunner.Config{ NumWorkers: 1, @@ -95,7 +95,7 @@ func Test_Config_NoPool(t *testing.T) { Forbid: []string{".go"}, }, Workers: &roadrunner.ServerConfig{ - Command: "php php-src/tests/client.php echo pipes", + Command: "php tests/client.php echo pipes", Relay: "pipes", Pool: &roadrunner.Config{ NumWorkers: 0, @@ -118,7 +118,7 @@ func Test_Config_DeadPool(t *testing.T) { Forbid: []string{".go"}, }, Workers: &roadrunner.ServerConfig{ - Command: "php php-src/tests/client.php echo pipes", + Command: "php tests/client.php echo pipes", Relay: "pipes", }, } @@ -136,7 +136,7 @@ func Test_Config_InvalidAddress(t *testing.T) { Forbid: []string{".go"}, }, Workers: &roadrunner.ServerConfig{ - Command: "php php-src/tests/client.php echo pipes", + Command: "php tests/client.php echo pipes", Relay: "pipes", Pool: &roadrunner.Config{ NumWorkers: 1, diff --git a/service/http/handler_test.go b/service/http/handler_test.go index 3b51c873..e864b86e 100644 --- a/service/http/handler_test.go +++ b/service/http/handler_test.go @@ -39,7 +39,7 @@ func TestServer_Echo(t *testing.T) { }, }, rr: roadrunner.NewServer(&roadrunner.ServerConfig{ - Command: "php ../../php-src/tests/http/client.php echo pipes", + Command: "php ../../tests/http/client.php echo pipes", Relay: "pipes", Pool: &roadrunner.Config{ NumWorkers: 1, @@ -74,7 +74,7 @@ func Test_HandlerErrors(t *testing.T) { }, }, rr: roadrunner.NewServer(&roadrunner.ServerConfig{ - Command: "php ../../php-src/tests/http/client.php echo pipes", + Command: "php ../../tests/http/client.php echo pipes", Relay: "pipes", Pool: &roadrunner.Config{ NumWorkers: 1, @@ -101,7 +101,7 @@ func Test_Handler_JSON_error(t *testing.T) { }, }, rr: roadrunner.NewServer(&roadrunner.ServerConfig{ - Command: "php ../../php-src/tests/http/client.php echo pipes", + Command: "php ../../tests/http/client.php echo pipes", Relay: "pipes", Pool: &roadrunner.Config{ NumWorkers: 1, @@ -130,7 +130,7 @@ func TestServer_Headers(t *testing.T) { }, }, rr: roadrunner.NewServer(&roadrunner.ServerConfig{ - Command: "php ../../php-src/tests/http/client.php header pipes", + Command: "php ../../tests/http/client.php header pipes", Relay: "pipes", Pool: &roadrunner.Config{ NumWorkers: 1, @@ -177,7 +177,7 @@ func TestServer_Cookies(t *testing.T) { }, }, rr: roadrunner.NewServer(&roadrunner.ServerConfig{ - Command: "php ../../php-src/tests/http/client.php cookie pipes", + Command: "php ../../tests/http/client.php cookie pipes", Relay: "pipes", Pool: &roadrunner.Config{ NumWorkers: 1, @@ -228,7 +228,7 @@ func TestServer_JsonPayload_POST(t *testing.T) { }, }, rr: roadrunner.NewServer(&roadrunner.ServerConfig{ - Command: "php ../../php-src/tests/http/client.php payload pipes", + Command: "php ../../tests/http/client.php payload pipes", Relay: "pipes", Pool: &roadrunner.Config{ NumWorkers: 1, @@ -278,7 +278,7 @@ func TestServer_JsonPayload_PUT(t *testing.T) { }, }, rr: roadrunner.NewServer(&roadrunner.ServerConfig{ - Command: "php ../../php-src/tests/http/client.php payload pipes", + Command: "php ../../tests/http/client.php payload pipes", Relay: "pipes", Pool: &roadrunner.Config{ NumWorkers: 1, @@ -324,7 +324,7 @@ func TestServer_JsonPayload_PATCH(t *testing.T) { }, }, rr: roadrunner.NewServer(&roadrunner.ServerConfig{ - Command: "php ../../php-src/tests/http/client.php payload pipes", + Command: "php ../../tests/http/client.php payload pipes", Relay: "pipes", Pool: &roadrunner.Config{ NumWorkers: 1, @@ -370,7 +370,7 @@ func TestServer_FormData_POST(t *testing.T) { }, }, rr: roadrunner.NewServer(&roadrunner.ServerConfig{ - Command: "php ../../php-src/tests/http/client.php data pipes", + Command: "php ../../tests/http/client.php data pipes", Relay: "pipes", Pool: &roadrunner.Config{ NumWorkers: 1, @@ -428,7 +428,7 @@ func TestServer_FormData_PUT(t *testing.T) { }, }, rr: roadrunner.NewServer(&roadrunner.ServerConfig{ - Command: "php ../../php-src/tests/http/client.php data pipes", + Command: "php ../../tests/http/client.php data pipes", Relay: "pipes", Pool: &roadrunner.Config{ NumWorkers: 1, @@ -486,7 +486,7 @@ func TestServer_FormData_PATCH(t *testing.T) { }, }, rr: roadrunner.NewServer(&roadrunner.ServerConfig{ - Command: "php ../../php-src/tests/http/client.php data pipes", + Command: "php ../../tests/http/client.php data pipes", Relay: "pipes", Pool: &roadrunner.Config{ NumWorkers: 1, @@ -544,7 +544,7 @@ func TestServer_Multipart_POST(t *testing.T) { }, }, rr: roadrunner.NewServer(&roadrunner.ServerConfig{ - Command: "php ../../php-src/tests/http/client.php data pipes", + Command: "php ../../tests/http/client.php data pipes", Relay: "pipes", Pool: &roadrunner.Config{ NumWorkers: 1, @@ -606,7 +606,7 @@ func TestServer_Multipart_PUT(t *testing.T) { }, }, rr: roadrunner.NewServer(&roadrunner.ServerConfig{ - Command: "php ../../php-src/tests/http/client.php data pipes", + Command: "php ../../tests/http/client.php data pipes", Relay: "pipes", Pool: &roadrunner.Config{ NumWorkers: 1, @@ -668,7 +668,7 @@ func TestServer_Multipart_PATCH(t *testing.T) { }, }, rr: roadrunner.NewServer(&roadrunner.ServerConfig{ - Command: "php ../../php-src/tests/http/client.php data pipes", + Command: "php ../../tests/http/client.php data pipes", Relay: "pipes", Pool: &roadrunner.Config{ NumWorkers: 1, @@ -730,7 +730,7 @@ func TestServer_Error(t *testing.T) { }, }, rr: roadrunner.NewServer(&roadrunner.ServerConfig{ - Command: "php ../../php-src/tests/http/client.php error pipes", + Command: "php ../../tests/http/client.php error pipes", Relay: "pipes", Pool: &roadrunner.Config{ NumWorkers: 1, @@ -764,7 +764,7 @@ func TestServer_Error2(t *testing.T) { }, }, rr: roadrunner.NewServer(&roadrunner.ServerConfig{ - Command: "php ../../php-src/tests/http/client.php error2 pipes", + Command: "php ../../tests/http/client.php error2 pipes", Relay: "pipes", Pool: &roadrunner.Config{ NumWorkers: 1, @@ -798,7 +798,7 @@ func TestServer_Error3(t *testing.T) { }, }, rr: roadrunner.NewServer(&roadrunner.ServerConfig{ - Command: "php ../../php-src/tests/http/client.php pid pipes", + Command: "php ../../tests/http/client.php pid pipes", Relay: "pipes", Pool: &roadrunner.Config{ NumWorkers: 1, @@ -843,7 +843,7 @@ func BenchmarkHandler_Listen_Echo(b *testing.B) { }, }, rr: roadrunner.NewServer(&roadrunner.ServerConfig{ - Command: "php ../../php-src/tests/http/client.php echo pipes", + Command: "php ../../tests/http/client.php echo pipes", Relay: "pipes", Pool: &roadrunner.Config{ NumWorkers: int64(runtime.NumCPU()), diff --git a/service/http/rpc_test.go b/service/http/rpc_test.go index 32bb776c..ba3efd2e 100644 --- a/service/http/rpc_test.go +++ b/service/http/rpc_test.go @@ -33,7 +33,7 @@ func Test_RPC(t *testing.T) { "forbid": [] }, "workers":{ - "command": "php ../../php-src/tests/http/client.php pid pipes", + "command": "php ../../tests/http/client.php pid pipes", "relay": "pipes", "pool": { "numWorkers": 1, @@ -94,7 +94,7 @@ func Test_RPC_Unix(t *testing.T) { "forbid": [] }, "workers":{ - "command": "php ../../php-src/tests/http/client.php pid pipes", + "command": "php ../../tests/http/client.php pid pipes", "relay": "pipes", "pool": { "numWorkers": 1, @@ -148,7 +148,7 @@ func Test_Workers(t *testing.T) { "forbid": [] }, "workers":{ - "command": "php ../../php-src/tests/http/client.php pid pipes", + "command": "php ../../tests/http/client.php pid pipes", "relay": "pipes", "pool": { "numWorkers": 1, diff --git a/service/http/service_test.go b/service/http/service_test.go index 8dab7cd4..03a2b9a5 100644 --- a/service/http/service_test.go +++ b/service/http/service_test.go @@ -72,7 +72,7 @@ func Test_Service_Configure_Disable(t *testing.T) { "forbid": [] }, "workers":{ - "command": "php ../../php-src/tests/http/client.php echo pipes", + "command": "php ../../tests/http/client.php echo pipes", "relay": "pipes", "pool": { "numWorkers": 1, @@ -103,7 +103,7 @@ func Test_Service_Configure_Enable(t *testing.T) { "forbid": [] }, "workers":{ - "command": "php ../../php-src/tests/http/client.php echo pipes", + "command": "php ../../tests/http/client.php echo pipes", "relay": "pipes", "pool": { "numWorkers": 1, @@ -134,7 +134,7 @@ func Test_Service_Echo(t *testing.T) { "forbid": [] }, "workers":{ - "command": "php ../../php-src/tests/http/client.php echo pipes", + "command": "php ../../tests/http/client.php echo pipes", "relay": "pipes", "pool": { "numWorkers": 1, @@ -187,7 +187,7 @@ func Test_Service_Env(t *testing.T) { "forbid": [] }, "workers":{ - "command": "php ../../php-src/tests/http/client.php env pipes", + "command": "php ../../tests/http/client.php env pipes", "relay": "pipes", "pool": { "numWorkers": 1, @@ -239,7 +239,7 @@ func Test_Service_ErrorEcho(t *testing.T) { "forbid": [] }, "workers":{ - "command": "php ../../php-src/tests/http/client.php echoerr pipes", + "command": "php ../../tests/http/client.php echoerr pipes", "relay": "pipes", "pool": { "numWorkers": 1, @@ -299,7 +299,7 @@ func Test_Service_Middleware(t *testing.T) { "forbid": [] }, "workers":{ - "command": "php ../../php-src/tests/http/client.php echo pipes", + "command": "php ../../tests/http/client.php echo pipes", "relay": "pipes", "pool": { "numWorkers": 1, @@ -373,7 +373,7 @@ func Test_Service_Listener(t *testing.T) { "forbid": [] }, "workers":{ - "command": "php ../../php-src/tests/http/client.php echo pipes", + "command": "php ../../tests/http/client.php echo pipes", "relay": "pipes", "pool": { "numWorkers": 1, @@ -417,7 +417,7 @@ func Test_Service_Error(t *testing.T) { "forbid": [] }, "workers":{ - "command": "php ../../php-src/tests/http/client.php echo pipes", + "command": "php ../../tests/http/client.php echo pipes", "relay": "---", "pool": { "numWorkers": 1, @@ -446,7 +446,7 @@ func Test_Service_Error2(t *testing.T) { "forbid": [] }, "workers":{ - "command": "php ../../php-src/tests/http/client.php broken pipes", + "command": "php ../../tests/http/client.php broken pipes", "relay": "pipes", "pool": { "numWorkers": 1, @@ -475,7 +475,7 @@ func Test_Service_Error3(t *testing.T) { "forbid": [] }, "workers" - "command": "php ../../php-src/tests/http/client.php broken pipes", + "command": "php ../../tests/http/client.php broken pipes", "relay": "pipes", "pool": { "numWorkers": 1, @@ -502,7 +502,7 @@ func Test_Service_Error4(t *testing.T) { "forbid": [] }, "workers":{ - "command": "php ../../php-src/tests/http/client.php broken pipes", + "command": "php ../../tests/http/client.php broken pipes", "relay": "pipes", "pool": { "numWorkers": 1, diff --git a/service/http/uploads_test.go b/service/http/uploads_test.go index b2662bf7..96e95733 100644 --- a/service/http/uploads_test.go +++ b/service/http/uploads_test.go @@ -27,7 +27,7 @@ func TestServer_Upload_File(t *testing.T) { }, }, rr: roadrunner.NewServer(&roadrunner.ServerConfig{ - Command: "php ../../php-src/tests/http/client.php upload pipes", + Command: "php ../../tests/http/client.php upload pipes", Relay: "pipes", Pool: &roadrunner.Config{ NumWorkers: 1, @@ -88,7 +88,7 @@ func TestServer_Upload_NestedFile(t *testing.T) { }, }, rr: roadrunner.NewServer(&roadrunner.ServerConfig{ - Command: "php ../../php-src/tests/http/client.php upload pipes", + Command: "php ../../tests/http/client.php upload pipes", Relay: "pipes", Pool: &roadrunner.Config{ NumWorkers: 1, @@ -149,7 +149,7 @@ func TestServer_Upload_File_NoTmpDir(t *testing.T) { }, }, rr: roadrunner.NewServer(&roadrunner.ServerConfig{ - Command: "php ../../php-src/tests/http/client.php upload pipes", + Command: "php ../../tests/http/client.php upload pipes", Relay: "pipes", Pool: &roadrunner.Config{ NumWorkers: 1, @@ -210,7 +210,7 @@ func TestServer_Upload_File_Forbids(t *testing.T) { }, }, rr: roadrunner.NewServer(&roadrunner.ServerConfig{ - Command: "php ../../php-src/tests/http/client.php upload pipes", + Command: "php ../../tests/http/client.php upload pipes", Relay: "pipes", Pool: &roadrunner.Config{ NumWorkers: 1, diff --git a/service/static/service_test.go b/service/static/service_test.go index 842e5e0b..7b40b8ad 100644 --- a/service/static/service_test.go +++ b/service/static/service_test.go @@ -56,7 +56,7 @@ func Test_Files(t *testing.T) { c.Register(ID, &Service{}) assert.NoError(t, c.Init(&testCfg{ - static: `{"enable":true, "dir":"../../php-src/tests", "forbid":[]}`, + static: `{"enable":true, "dir":"../../tests", "forbid":[]}`, httpCfg: `{ "enable": true, "address": ":6029", @@ -66,7 +66,7 @@ func Test_Files(t *testing.T) { "forbid": [] }, "workers":{ - "command": "php ../../php-src/tests/http/client.php pid pipes", + "command": "php ../../tests/http/client.php pid pipes", "relay": "pipes", "pool": { "numWorkers": 1, @@ -93,7 +93,7 @@ func Test_Files_Disable(t *testing.T) { c.Register(ID, &Service{}) assert.NoError(t, c.Init(&testCfg{ - static: `{"enable":false, "dir":"../../php-src/tests", "forbid":[".php"]}`, + static: `{"enable":false, "dir":"../../tests", "forbid":[".php"]}`, httpCfg: `{ "enable": true, "address": ":6029", @@ -103,7 +103,7 @@ func Test_Files_Disable(t *testing.T) { "forbid": [] }, "workers":{ - "command": "php ../../php-src/tests/http/client.php echo pipes", + "command": "php ../../tests/http/client.php echo pipes", "relay": "pipes", "pool": { "numWorkers": 1, @@ -140,7 +140,7 @@ func Test_Files_Error(t *testing.T) { "forbid": [] }, "workers":{ - "command": "php ../../php-src/tests/http/client.php echo pipes", + "command": "php ../../tests/http/client.php echo pipes", "relay": "pipes", "pool": { "numWorkers": 1, @@ -170,7 +170,7 @@ func Test_Files_Error2(t *testing.T) { "forbid": [] }, "workers":{ - "command": "php ../../php-src/tests/http/client.php echo pipes", + "command": "php ../../tests/http/client.php echo pipes", "relay": "pipes", "pool": { "numWorkers": 1, @@ -190,7 +190,7 @@ func Test_Files_Forbid(t *testing.T) { c.Register(ID, &Service{}) assert.NoError(t, c.Init(&testCfg{ - static: `{"enable":true, "dir":"../../php-src/tests", "forbid":[".php"]}`, + static: `{"enable":true, "dir":"../../tests", "forbid":[".php"]}`, httpCfg: `{ "enable": true, "address": ":6029", @@ -200,7 +200,7 @@ func Test_Files_Forbid(t *testing.T) { "forbid": [] }, "workers":{ - "command": "php ../../php-src/tests/http/client.php echo pipes", + "command": "php ../../tests/http/client.php echo pipes", "relay": "pipes", "pool": { "numWorkers": 1, @@ -227,7 +227,7 @@ func Test_Files_NotFound(t *testing.T) { c.Register(ID, &Service{}) assert.NoError(t, c.Init(&testCfg{ - static: `{"enable":true, "dir":"../../php-src/tests", "forbid":[".php"]}`, + static: `{"enable":true, "dir":"../../tests", "forbid":[".php"]}`, httpCfg: `{ "enable": true, "address": ":6029", @@ -237,7 +237,7 @@ func Test_Files_NotFound(t *testing.T) { "forbid": [] }, "workers":{ - "command": "php ../../php-src/tests/http/client.php echo pipes", + "command": "php ../../tests/http/client.php echo pipes", "relay": "pipes", "pool": { "numWorkers": 1, @@ -264,7 +264,7 @@ func Test_Files_Dir(t *testing.T) { c.Register(ID, &Service{}) assert.NoError(t, c.Init(&testCfg{ - static: `{"enable":true, "dir":"../../php-src/tests", "forbid":[".php"]}`, + static: `{"enable":true, "dir":"../../tests", "forbid":[".php"]}`, httpCfg: `{ "enable": true, "address": ":6029", @@ -274,7 +274,7 @@ func Test_Files_Dir(t *testing.T) { "forbid": [] }, "workers":{ - "command": "php ../../php-src/tests/http/client.php echo pipes", + "command": "php ../../tests/http/client.php echo pipes", "relay": "pipes", "pool": { "numWorkers": 1, @@ -301,7 +301,7 @@ func Test_Files_NotForbid(t *testing.T) { c.Register(ID, &Service{}) assert.NoError(t, c.Init(&testCfg{ - static: `{"enable":true, "dir":"../../php-src/tests", "forbid":[]}`, + static: `{"enable":true, "dir":"../../tests", "forbid":[]}`, httpCfg: `{ "enable": true, "address": ":6029", @@ -311,7 +311,7 @@ func Test_Files_NotForbid(t *testing.T) { "forbid": [] }, "workers":{ - "command": "php ../../php-src/tests/http/client.php pid pipes", + "command": "php ../../tests/http/client.php pid pipes", "relay": "pipes", "pool": { "numWorkers": 1, @@ -326,7 +326,7 @@ func Test_Files_NotForbid(t *testing.T) { defer c.Stop() b, _, _ := get("http://localhost:6029/client.php") - assert.Equal(t, all("../../php-src/tests/client.php"), b) + assert.Equal(t, all("../../tests/client.php"), b) } func tmpDir() string { -- cgit v1.2.3