summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/plugins/broadcast/configs/.rr-broadcast-config-error.yaml1
-rw-r--r--tests/plugins/broadcast/configs/.rr-broadcast-global.yaml72
-rw-r--r--tests/plugins/broadcast/configs/.rr-broadcast-init.yaml5
-rw-r--r--tests/plugins/broadcast/configs/.rr-broadcast-same-section.yaml69
-rw-r--r--tests/plugins/kv/configs/.rr-boltdb.yaml21
-rw-r--r--tests/plugins/kv/configs/.rr-in-memory.yaml13
-rw-r--r--tests/plugins/kv/configs/.rr-kv-bolt-no-interval.yaml24
-rw-r--r--tests/plugins/kv/configs/.rr-kv-bolt-perms.yaml22
-rw-r--r--tests/plugins/kv/configs/.rr-kv-init.yaml49
-rw-r--r--tests/plugins/kv/configs/.rr-memcached.yaml15
-rw-r--r--tests/plugins/kv/configs/.rr-redis-global.yaml14
-rw-r--r--tests/plugins/kv/configs/.rr-redis-no-config.yaml10
-rw-r--r--tests/plugins/kv/configs/.rr-redis.yaml15
-rw-r--r--tests/plugins/kv/storage_plugin_test.go44
-rw-r--r--tests/plugins/websockets/configs/.rr-websockets-allow.yaml65
-rw-r--r--tests/plugins/websockets/configs/.rr-websockets-allow2.yaml70
-rw-r--r--tests/plugins/websockets/configs/.rr-websockets-broker-no-section.yaml60
-rw-r--r--tests/plugins/websockets/configs/.rr-websockets-deny.yaml61
-rw-r--r--tests/plugins/websockets/configs/.rr-websockets-deny2.yaml64
-rw-r--r--tests/plugins/websockets/configs/.rr-websockets-init.yaml68
-rw-r--r--tests/plugins/websockets/configs/.rr-websockets-redis.yaml65
-rw-r--r--tests/plugins/websockets/configs/.rr-websockets-stop.yaml61
22 files changed, 489 insertions, 399 deletions
diff --git a/tests/plugins/broadcast/configs/.rr-broadcast-config-error.yaml b/tests/plugins/broadcast/configs/.rr-broadcast-config-error.yaml
index 66114d64..1474feb7 100644
--- a/tests/plugins/broadcast/configs/.rr-broadcast-config-error.yaml
+++ b/tests/plugins/broadcast/configs/.rr-broadcast-config-error.yaml
@@ -17,6 +17,7 @@ http:
allocate_timeout: 60s
destroy_timeout: 60s
+# no global or local config
broadcast:
default:
driver: redis
diff --git a/tests/plugins/broadcast/configs/.rr-broadcast-global.yaml b/tests/plugins/broadcast/configs/.rr-broadcast-global.yaml
index 3216f875..c193af00 100644
--- a/tests/plugins/broadcast/configs/.rr-broadcast-global.yaml
+++ b/tests/plugins/broadcast/configs/.rr-broadcast-global.yaml
@@ -1,40 +1,52 @@
rpc:
- listen: tcp://127.0.0.1:6003
+ listen: tcp://127.0.0.1:6003
server:
- command: "php ../../psr-worker-bench.php"
- relay: "pipes"
- relay_timeout: "20s"
+ command: "php ../../psr-worker-bench.php"
+ relay: "pipes"
+ relay_timeout: "20s"
http:
- address: 127.0.0.1:21543
- max_request_size: 1024
- middleware: [ "websockets" ]
- trusted_subnets: [ "10.0.0.0/8", "127.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "::1/128", "fc00::/7", "fe80::/10" ]
- pool:
- num_workers: 2
- max_jobs: 0
- allocate_timeout: 60s
- destroy_timeout: 60s
+ address: 127.0.0.1:21543
+ max_request_size: 1024
+ middleware: ["websockets"]
+ trusted_subnets:
+ [
+ "10.0.0.0/8",
+ "127.0.0.0/8",
+ "172.16.0.0/12",
+ "192.168.0.0/16",
+ "::1/128",
+ "fc00::/7",
+ "fe80::/10",
+ ]
+ pool:
+ num_workers: 2
+ max_jobs: 0
+ allocate_timeout: 60s
+ destroy_timeout: 60s
-redis:
- addrs:
- - "127.0.0.1:6379"
-
-broadcast:
- test:
- driver: redis
- use: global
- test2:
- driver: redis
+test:
addrs:
- - "127.0.0.1:6378"
- test3:
- driver: memory
- test4:
- driver: memory
+ - "127.0.0.1:6379"
+broadcast:
+ test:
+ driver: redis
+ test2:
+ driver: redis
+ config:
+ addrs:
+ - "127.0.0.1:6378"
+ test3:
+ driver: memory
+ config:
+ placeholder: ""
+ test4:
+ driver: memory
+ config:
+ placeholder: ""
logs:
- mode: development
- level: info
+ mode: development
+ level: info
diff --git a/tests/plugins/broadcast/configs/.rr-broadcast-init.yaml b/tests/plugins/broadcast/configs/.rr-broadcast-init.yaml
index d8457578..1cbebdd7 100644
--- a/tests/plugins/broadcast/configs/.rr-broadcast-init.yaml
+++ b/tests/plugins/broadcast/configs/.rr-broadcast-init.yaml
@@ -22,8 +22,9 @@ http:
broadcast:
default:
driver: redis
- addrs:
- - "127.0.0.1:6379"
+ config:
+ addrs:
+ - "127.0.0.1:6379"
logs:
mode: development
diff --git a/tests/plugins/broadcast/configs/.rr-broadcast-same-section.yaml b/tests/plugins/broadcast/configs/.rr-broadcast-same-section.yaml
index 2337b8fe..f162aeba 100644
--- a/tests/plugins/broadcast/configs/.rr-broadcast-same-section.yaml
+++ b/tests/plugins/broadcast/configs/.rr-broadcast-same-section.yaml
@@ -1,36 +1,51 @@
rpc:
- listen: tcp://127.0.0.1:6002
+ listen: tcp://127.0.0.1:6002
server:
- command: "php ../../psr-worker-bench.php"
- relay: "pipes"
- relay_timeout: "20s"
+ command: "php ../../psr-worker-bench.php"
+ relay: "pipes"
+ relay_timeout: "20s"
http:
- address: 127.0.0.1:21345
- max_request_size: 1024
- middleware: [ "websockets" ]
- trusted_subnets: [ "10.0.0.0/8", "127.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "::1/128", "fc00::/7", "fe80::/10" ]
- pool:
- num_workers: 2
- max_jobs: 0
- allocate_timeout: 60s
- destroy_timeout: 60s
+ address: 127.0.0.1:21345
+ max_request_size: 1024
+ middleware: ["websockets"]
+ trusted_subnets:
+ [
+ "10.0.0.0/8",
+ "127.0.0.0/8",
+ "172.16.0.0/12",
+ "192.168.0.0/16",
+ "::1/128",
+ "fc00::/7",
+ "fe80::/10",
+ ]
+ pool:
+ num_workers: 2
+ max_jobs: 0
+ allocate_timeout: 60s
+ destroy_timeout: 60s
broadcast:
- test:
- driver: redis
- addrs:
- - "127.0.0.1:6379"
- test2:
- driver: redis
- addrs:
- - "127.0.0.1:6378"
- test3:
- driver: memory
- test4:
- driver: memory
+ test:
+ driver: redis
+ config:
+ addrs:
+ - "127.0.0.1:6379"
+ test2:
+ driver: redis
+ config:
+ addrs:
+ - "127.0.0.1:6378"
+ test3:
+ driver: memory
+ config:
+ placeholder: ""
+ test4:
+ driver: memory
+ config:
+ placeholder: ""
logs:
- mode: development
- level: info
+ mode: development
+ level: info
diff --git a/tests/plugins/kv/configs/.rr-boltdb.yaml b/tests/plugins/kv/configs/.rr-boltdb.yaml
index 81b47715..7a8aee4e 100644
--- a/tests/plugins/kv/configs/.rr-boltdb.yaml
+++ b/tests/plugins/kv/configs/.rr-boltdb.yaml
@@ -1,15 +1,16 @@
rpc:
- listen: tcp://127.0.0.1:6001
+ listen: tcp://127.0.0.1:6001
logs:
- mode: development
- level: error
+ mode: development
+ level: error
kv:
- boltdb-rr:
- driver: boltdb
- dir: "."
- file: "rr.db"
- bucket: "test"
- permissions: 0666
- interval: 1 # seconds
+ boltdb-rr:
+ driver: boltdb
+ config:
+ dir: "."
+ file: "rr.db"
+ bucket: "test"
+ permissions: 0666
+ interval: 1 # seconds
diff --git a/tests/plugins/kv/configs/.rr-in-memory.yaml b/tests/plugins/kv/configs/.rr-in-memory.yaml
index b3b01f46..0452d8bc 100644
--- a/tests/plugins/kv/configs/.rr-in-memory.yaml
+++ b/tests/plugins/kv/configs/.rr-in-memory.yaml
@@ -1,11 +1,12 @@
rpc:
- listen: tcp://127.0.0.1:6001
+ listen: tcp://127.0.0.1:6001
logs:
- mode: development
- level: error
+ mode: development
+ level: error
kv:
- memory-rr:
- driver: memory
- interval: 1
+ memory-rr:
+ driver: memory
+ config:
+ interval: 1
diff --git a/tests/plugins/kv/configs/.rr-kv-bolt-no-interval.yaml b/tests/plugins/kv/configs/.rr-kv-bolt-no-interval.yaml
index 471e5c77..476369c5 100644
--- a/tests/plugins/kv/configs/.rr-kv-bolt-no-interval.yaml
+++ b/tests/plugins/kv/configs/.rr-kv-bolt-no-interval.yaml
@@ -1,17 +1,19 @@
rpc:
- listen: tcp://127.0.0.1:6001
+ listen: tcp://127.0.0.1:6001
logs:
- mode: development
- level: error
+ mode: development
+ level: error
kv:
- boltdb-south:
- driver: boltdb
- file: "rr.db"
- permissions: 755
+ boltdb-south:
+ driver: boltdb
+ config:
+ file: "rr.db"
+ permissions: 755
- boltdb-africa:
- driver: boltdb
- file: "africa.db"
- permissions: 755
+ boltdb-africa:
+ driver: boltdb
+ config:
+ file: "africa.db"
+ permissions: 755
diff --git a/tests/plugins/kv/configs/.rr-kv-bolt-perms.yaml b/tests/plugins/kv/configs/.rr-kv-bolt-perms.yaml
index b46bcb1c..e7728972 100644
--- a/tests/plugins/kv/configs/.rr-kv-bolt-perms.yaml
+++ b/tests/plugins/kv/configs/.rr-kv-bolt-perms.yaml
@@ -1,16 +1,18 @@
rpc:
- listen: tcp://127.0.0.1:6001
+ listen: tcp://127.0.0.1:6001
logs:
- mode: development
- level: error
+ mode: development
+ level: error
kv:
- boltdb-south:
- driver: boltdb
- file: "rr.db"
+ boltdb-south:
+ driver: boltdb
+ config:
+ file: "rr.db"
- boltdb-africa:
- driver: boltdb
- file: "africa.db"
- permissions: 0777
+ boltdb-africa:
+ driver: boltdb
+ config:
+ file: "africa.db"
+ permissions: 0777
diff --git a/tests/plugins/kv/configs/.rr-kv-init.yaml b/tests/plugins/kv/configs/.rr-kv-init.yaml
index 6407c7ad..10cf6491 100644
--- a/tests/plugins/kv/configs/.rr-kv-init.yaml
+++ b/tests/plugins/kv/configs/.rr-kv-init.yaml
@@ -1,30 +1,35 @@
rpc:
- listen: tcp://127.0.0.1:6001
+ listen: tcp://127.0.0.1:6001
logs:
- mode: development
- level: error
+ mode: development
+ level: error
kv:
- default:
- driver: memory
+ default:
+ driver: memory
+ config:
+ interval: 60
- boltdb-south:
- driver: boltdb
- dir: "."
- file: "rr.db"
- bucket: "rr"
- permissions: 0666
- interval: 1
+ boltdb-south:
+ driver: boltdb
+ config:
+ dir: "."
+ file: "rr.db"
+ bucket: "rr"
+ permissions: 0666
+ interval: 1
- boltdb-africa:
- driver: boltdb
- dir: "."
- file: "africa.db"
- bucket: "rr"
- permissions: 0666
- interval: 1
+ boltdb-africa:
+ driver: boltdb
+ config:
+ dir: "."
+ file: "africa.db"
+ bucket: "rr"
+ permissions: 0666
+ interval: 1
- memcached:
- driver: memcached
- addr: [ "127.0.0.1:11211" ]
+ memcached:
+ driver: memcached
+ config:
+ addr: ["127.0.0.1:11211"]
diff --git a/tests/plugins/kv/configs/.rr-memcached.yaml b/tests/plugins/kv/configs/.rr-memcached.yaml
index da5d59c6..ef8de2ab 100644
--- a/tests/plugins/kv/configs/.rr-memcached.yaml
+++ b/tests/plugins/kv/configs/.rr-memcached.yaml
@@ -1,12 +1,13 @@
rpc:
- listen: tcp://127.0.0.1:6001
+ listen: tcp://127.0.0.1:6001
logs:
- mode: development
- level: error
+ mode: development
+ level: error
kv:
- memcached-rr:
- driver: memcached
- addr:
- - "127.0.0.1:11211"
+ memcached-rr:
+ driver: memcached
+ config:
+ addr:
+ - "127.0.0.1:11211"
diff --git a/tests/plugins/kv/configs/.rr-redis-global.yaml b/tests/plugins/kv/configs/.rr-redis-global.yaml
index a4979879..27377835 100644
--- a/tests/plugins/kv/configs/.rr-redis-global.yaml
+++ b/tests/plugins/kv/configs/.rr-redis-global.yaml
@@ -1,14 +1,14 @@
rpc:
- listen: tcp://127.0.0.1:6001
+ listen: tcp://127.0.0.1:6001
logs:
- mode: development
- level: error
+ mode: development
+ level: error
redis-rr:
- addrs:
- - '127.0.0.1:6379'
+ addrs:
+ - "127.0.0.1:6379"
kv:
- redis-rr:
- driver: redis
+ redis-rr:
+ driver: redis
diff --git a/tests/plugins/kv/configs/.rr-redis-no-config.yaml b/tests/plugins/kv/configs/.rr-redis-no-config.yaml
index 9cf06374..56113f13 100644
--- a/tests/plugins/kv/configs/.rr-redis-no-config.yaml
+++ b/tests/plugins/kv/configs/.rr-redis-no-config.yaml
@@ -1,10 +1,10 @@
rpc:
- listen: tcp://127.0.0.1:6001
+ listen: tcp://127.0.0.1:6001
logs:
- mode: development
- level: error
+ mode: development
+ level: error
kv:
- redis-rr:
- driver: redis
+ redis-rr:
+ driver: redis
diff --git a/tests/plugins/kv/configs/.rr-redis.yaml b/tests/plugins/kv/configs/.rr-redis.yaml
index 522e365a..f9b967d5 100644
--- a/tests/plugins/kv/configs/.rr-redis.yaml
+++ b/tests/plugins/kv/configs/.rr-redis.yaml
@@ -1,12 +1,13 @@
rpc:
- listen: tcp://127.0.0.1:6001
+ listen: tcp://127.0.0.1:6001
logs:
- mode: development
- level: error
+ mode: development
+ level: error
kv:
- redis-rr:
- driver: redis
- addrs:
- - '127.0.0.1:6379'
+ redis-rr:
+ driver: redis
+ config:
+ addrs:
+ - "127.0.0.1:6379"
diff --git a/tests/plugins/kv/storage_plugin_test.go b/tests/plugins/kv/storage_plugin_test.go
index e757a9e6..ec9e74fd 100644
--- a/tests/plugins/kv/storage_plugin_test.go
+++ b/tests/plugins/kv/storage_plugin_test.go
@@ -1308,48 +1308,8 @@ func TestRedisNoConfig(t *testing.T) {
t.Fatal(err)
}
- ch, err := cont.Serve()
- assert.NoError(t, err)
-
- sig := make(chan os.Signal, 1)
- signal.Notify(sig, os.Interrupt, syscall.SIGINT, syscall.SIGTERM)
-
- wg := &sync.WaitGroup{}
- wg.Add(1)
-
- stopCh := make(chan struct{}, 1)
-
- go func() {
- defer wg.Done()
- for {
- select {
- case e := <-ch:
- assert.Fail(t, "error", e.Error.Error())
- err = cont.Stop()
- if err != nil {
- assert.FailNow(t, "error", err.Error())
- }
- case <-sig:
- err = cont.Stop()
- if err != nil {
- assert.FailNow(t, "error", err.Error())
- }
- return
- case <-stopCh:
- // timeout
- err = cont.Stop()
- if err != nil {
- assert.FailNow(t, "error", err.Error())
- }
- return
- }
- }
- }()
-
- time.Sleep(time.Second * 1)
- t.Run("REDIS", testRPCMethodsRedis)
- stopCh <- struct{}{}
- wg.Wait()
+ _, err = cont.Serve()
+ assert.Error(t, err)
}
func testRPCMethodsRedis(t *testing.T) {
diff --git a/tests/plugins/websockets/configs/.rr-websockets-allow.yaml b/tests/plugins/websockets/configs/.rr-websockets-allow.yaml
index 900094a4..cf48176c 100644
--- a/tests/plugins/websockets/configs/.rr-websockets-allow.yaml
+++ b/tests/plugins/websockets/configs/.rr-websockets-allow.yaml
@@ -1,42 +1,53 @@
rpc:
- listen: tcp://127.0.0.1:6001
+ listen: tcp://127.0.0.1:6001
server:
- command: "php ../../worker-ok.php"
- user: ""
- group: ""
- relay: "pipes"
- relay_timeout: "20s"
+ command: "php ../../worker-ok.php"
+ user: ""
+ group: ""
+ relay: "pipes"
+ relay_timeout: "20s"
http:
- address: 127.0.0.1:41278
- max_request_size: 1024
- middleware: [ "websockets" ]
- trusted_subnets: [ "10.0.0.0/8", "127.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "::1/128", "fc00::/7", "fe80::/10" ]
- pool:
- num_workers: 2
- max_jobs: 0
- allocate_timeout: 60s
- destroy_timeout: 60s
+ address: 127.0.0.1:41278
+ max_request_size: 1024
+ middleware: ["websockets"]
+ trusted_subnets:
+ [
+ "10.0.0.0/8",
+ "127.0.0.0/8",
+ "172.16.0.0/12",
+ "192.168.0.0/16",
+ "::1/128",
+ "fc00::/7",
+ "fe80::/10",
+ ]
+ pool:
+ num_workers: 2
+ max_jobs: 0
+ allocate_timeout: 60s
+ destroy_timeout: 60s
redis:
- addrs:
- - "127.0.0.1:6379"
+ addrs:
+ - "127.0.0.1:6379"
broadcast:
- test:
- driver: memory
+ test:
+ driver: memory
+ config:
+ placeholder: ""
websockets:
- broker: test
- allowed_origin: "*"
- path: "/ws"
+ broker: test
+ allowed_origin: "*"
+ path: "/ws"
logs:
- mode: development
- level: error
+ mode: development
+ level: error
endure:
- grace_period: 120s
- print_graph: false
- log_level: error
+ grace_period: 120s
+ print_graph: false
+ log_level: error
diff --git a/tests/plugins/websockets/configs/.rr-websockets-allow2.yaml b/tests/plugins/websockets/configs/.rr-websockets-allow2.yaml
index 43f4b2ec..f8e36136 100644
--- a/tests/plugins/websockets/configs/.rr-websockets-allow2.yaml
+++ b/tests/plugins/websockets/configs/.rr-websockets-allow2.yaml
@@ -1,44 +1,54 @@
rpc:
- listen: tcp://127.0.0.1:6001
+ listen: tcp://127.0.0.1:6001
server:
- command: "php ../../worker-ok.php"
- user: ""
- group: ""
- relay: "pipes"
- relay_timeout: "20s"
+ command: "php ../../worker-ok.php"
+ user: ""
+ group: ""
+ relay: "pipes"
+ relay_timeout: "20s"
http:
- address: 127.0.0.1:41270
- max_request_size: 1024
- middleware: [ "websockets" ]
- trusted_subnets: [ "10.0.0.0/8", "127.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "::1/128", "fc00::/7", "fe80::/10" ]
- pool:
- num_workers: 2
- max_jobs: 0
- allocate_timeout: 60s
- destroy_timeout: 60s
+ address: 127.0.0.1:41270
+ max_request_size: 1024
+ middleware: ["websockets"]
+ trusted_subnets:
+ [
+ "10.0.0.0/8",
+ "127.0.0.0/8",
+ "172.16.0.0/12",
+ "192.168.0.0/16",
+ "::1/128",
+ "fc00::/7",
+ "fe80::/10",
+ ]
+ pool:
+ num_workers: 2
+ max_jobs: 0
+ allocate_timeout: 60s
+ destroy_timeout: 60s
-redis:
- addrs:
- - "127.0.0.1:6379"
+test:
+ addrs:
+ - "127.0.0.1:6379"
broadcast:
- test:
- driver: redis
- addrs:
- - "127.0.0.1:6379"
+ test:
+ driver: redis
+ config:
+ addrs:
+ - "127.0.0.1:6379"
websockets:
- broker: test
- allowed_origin: "*"
- path: "/ws"
+ broker: test
+ allowed_origin: "*"
+ path: "/ws"
logs:
- mode: development
- level: error
+ mode: development
+ level: error
endure:
- grace_period: 120s
- print_graph: false
- log_level: error
+ grace_period: 120s
+ print_graph: false
+ log_level: error
diff --git a/tests/plugins/websockets/configs/.rr-websockets-broker-no-section.yaml b/tests/plugins/websockets/configs/.rr-websockets-broker-no-section.yaml
index ada23845..c72e1f15 100644
--- a/tests/plugins/websockets/configs/.rr-websockets-broker-no-section.yaml
+++ b/tests/plugins/websockets/configs/.rr-websockets-broker-no-section.yaml
@@ -1,38 +1,48 @@
rpc:
- listen: tcp://127.0.0.1:6001
+ listen: tcp://127.0.0.1:6001
server:
- command: "php ../../psr-worker-bench.php"
- user: ""
- group: ""
- relay: "pipes"
- relay_timeout: "20s"
+ command: "php ../../psr-worker-bench.php"
+ user: ""
+ group: ""
+ relay: "pipes"
+ relay_timeout: "20s"
http:
- address: 127.0.0.1:13235
- max_request_size: 1024
- middleware: [ "websockets" ]
- trusted_subnets: [ "10.0.0.0/8", "127.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "::1/128", "fc00::/7", "fe80::/10" ]
- pool:
- num_workers: 2
- max_jobs: 0
- allocate_timeout: 60s
- destroy_timeout: 60s
+ address: 127.0.0.1:13235
+ max_request_size: 1024
+ middleware: ["websockets"]
+ trusted_subnets:
+ [
+ "10.0.0.0/8",
+ "127.0.0.0/8",
+ "172.16.0.0/12",
+ "192.168.0.0/16",
+ "::1/128",
+ "fc00::/7",
+ "fe80::/10",
+ ]
+ pool:
+ num_workers: 2
+ max_jobs: 0
+ allocate_timeout: 60s
+ destroy_timeout: 60s
broadcast:
- test1:
- driver: no
+ test1:
+ driver: no
+ config:
websockets:
- broker: test
- allowed_origin: "*"
- path: "/ws"
+ broker: test
+ allowed_origin: "*"
+ path: "/ws"
logs:
- mode: development
- level: error
+ mode: development
+ level: error
endure:
- grace_period: 120s
- print_graph: false
- log_level: error
+ grace_period: 120s
+ print_graph: false
+ log_level: error
diff --git a/tests/plugins/websockets/configs/.rr-websockets-deny.yaml b/tests/plugins/websockets/configs/.rr-websockets-deny.yaml
index 594a746d..6ad6628c 100644
--- a/tests/plugins/websockets/configs/.rr-websockets-deny.yaml
+++ b/tests/plugins/websockets/configs/.rr-websockets-deny.yaml
@@ -1,38 +1,49 @@
rpc:
- listen: tcp://127.0.0.1:6001
+ listen: tcp://127.0.0.1:6001
server:
- command: "php ../../worker-deny.php"
- user: ""
- group: ""
- relay: "pipes"
- relay_timeout: "20s"
+ command: "php ../../worker-deny.php"
+ user: ""
+ group: ""
+ relay: "pipes"
+ relay_timeout: "20s"
http:
- address: 127.0.0.1:15587
- max_request_size: 1024
- middleware: [ "websockets" ]
- trusted_subnets: [ "10.0.0.0/8", "127.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "::1/128", "fc00::/7", "fe80::/10" ]
- pool:
- num_workers: 2
- max_jobs: 0
- allocate_timeout: 60s
- destroy_timeout: 60s
+ address: 127.0.0.1:15587
+ max_request_size: 1024
+ middleware: ["websockets"]
+ trusted_subnets:
+ [
+ "10.0.0.0/8",
+ "127.0.0.0/8",
+ "172.16.0.0/12",
+ "192.168.0.0/16",
+ "::1/128",
+ "fc00::/7",
+ "fe80::/10",
+ ]
+ pool:
+ num_workers: 2
+ max_jobs: 0
+ allocate_timeout: 60s
+ destroy_timeout: 60s
broadcast:
- test:
- driver: memory
+ test:
+ driver: memory
+ config:
+ placeholder: ""
websockets:
- broker: test
- allowed_origin: "*"
- path: "/ws"
+ broker: test
+ allowed_origin: "*"
+ path: "/ws"
logs:
- mode: development
- level: error
+ mode: development
+ level: error
endure:
- grace_period: 120s
- print_graph: false
- log_level: error
+ grace_period: 120s
+ print_graph: false
+ log_level: error
diff --git a/tests/plugins/websockets/configs/.rr-websockets-deny2.yaml b/tests/plugins/websockets/configs/.rr-websockets-deny2.yaml
index e0bdf993..b99a3571 100644
--- a/tests/plugins/websockets/configs/.rr-websockets-deny2.yaml
+++ b/tests/plugins/websockets/configs/.rr-websockets-deny2.yaml
@@ -1,40 +1,50 @@
rpc:
- listen: tcp://127.0.0.1:6001
+ listen: tcp://127.0.0.1:6001
server:
- command: "php ../../worker-deny.php"
- user: ""
- group: ""
- relay: "pipes"
- relay_timeout: "20s"
+ command: "php ../../worker-deny.php"
+ user: ""
+ group: ""
+ relay: "pipes"
+ relay_timeout: "20s"
http:
- address: 127.0.0.1:15588
- max_request_size: 1024
- middleware: [ "websockets" ]
- trusted_subnets: [ "10.0.0.0/8", "127.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "::1/128", "fc00::/7", "fe80::/10" ]
- pool:
- num_workers: 2
- max_jobs: 0
- allocate_timeout: 60s
- destroy_timeout: 60s
+ address: 127.0.0.1:15588
+ max_request_size: 1024
+ middleware: ["websockets"]
+ trusted_subnets:
+ [
+ "10.0.0.0/8",
+ "127.0.0.0/8",
+ "172.16.0.0/12",
+ "192.168.0.0/16",
+ "::1/128",
+ "fc00::/7",
+ "fe80::/10",
+ ]
+ pool:
+ num_workers: 2
+ max_jobs: 0
+ allocate_timeout: 60s
+ destroy_timeout: 60s
broadcast:
- test:
- driver: redis
- addrs:
- - "127.0.0.1:6379"
+ test:
+ driver: redis
+ config:
+ addrs:
+ - "127.0.0.1:6379"
websockets:
- broker: test
- allowed_origin: "*"
- path: "/ws"
+ broker: test
+ allowed_origin: "*"
+ path: "/ws"
logs:
- mode: development
- level: error
+ mode: development
+ level: error
endure:
- grace_period: 120s
- print_graph: false
- log_level: error
+ grace_period: 120s
+ print_graph: false
+ log_level: error
diff --git a/tests/plugins/websockets/configs/.rr-websockets-init.yaml b/tests/plugins/websockets/configs/.rr-websockets-init.yaml
index 115f9a71..733de25c 100644
--- a/tests/plugins/websockets/configs/.rr-websockets-init.yaml
+++ b/tests/plugins/websockets/configs/.rr-websockets-init.yaml
@@ -1,39 +1,55 @@
rpc:
- listen: tcp://127.0.0.1:6001
+ listen: tcp://127.0.0.1:6001
server:
- command: "php ../../psr-worker-bench.php"
- user: ""
- group: ""
- relay: "pipes"
- relay_timeout: "20s"
+ command: "php ../../psr-worker-bench.php"
+ user: ""
+ group: ""
+ relay: "pipes"
+ relay_timeout: "20s"
http:
- address: 127.0.0.1:11111
- max_request_size: 1024
- middleware: [ "websockets" ]
- trusted_subnets: [ "10.0.0.0/8", "127.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "::1/128", "fc00::/7", "fe80::/10" ]
- pool:
- num_workers: 2
- max_jobs: 0
- allocate_timeout: 60s
- destroy_timeout: 60s
+ address: 127.0.0.1:11111
+ max_request_size: 1024
+ middleware: ["websockets"]
+ trusted_subnets:
+ [
+ "10.0.0.0/8",
+ "127.0.0.0/8",
+ "172.16.0.0/12",
+ "192.168.0.0/16",
+ "::1/128",
+ "fc00::/7",
+ "fe80::/10",
+ ]
+ pool:
+ num_workers: 2
+ max_jobs: 0
+ allocate_timeout: 60s
+ destroy_timeout: 60s
broadcast:
- default:
- driver: memory
+ default:
+ driver: memory
+ # %YAML 1.1
+ #---
+ # !!map {
+ # ? !!str "key"
+ # : !!null "null",
+ #}
+ config:
+ placeholder: ""
websockets:
- broker: default
- allowed_origin: "*"
- path: "/ws"
-
+ broker: default
+ allowed_origin: "*"
+ path: "/ws"
logs:
- mode: development
- level: error
+ mode: development
+ level: error
endure:
- grace_period: 120s
- print_graph: false
- log_level: error
+ grace_period: 120s
+ print_graph: false
+ log_level: error
diff --git a/tests/plugins/websockets/configs/.rr-websockets-redis.yaml b/tests/plugins/websockets/configs/.rr-websockets-redis.yaml
index e3d5f0b8..fc01e0b1 100644
--- a/tests/plugins/websockets/configs/.rr-websockets-redis.yaml
+++ b/tests/plugins/websockets/configs/.rr-websockets-redis.yaml
@@ -1,42 +1,51 @@
rpc:
- listen: tcp://127.0.0.1:6001
+ listen: tcp://127.0.0.1:6001
server:
- command: "php ../../psr-worker-bench.php"
- user: ""
- group: ""
- relay: "pipes"
- relay_timeout: "20s"
+ command: "php ../../psr-worker-bench.php"
+ user: ""
+ group: ""
+ relay: "pipes"
+ relay_timeout: "20s"
http:
- address: 127.0.0.1:13235
- max_request_size: 1024
- middleware: [ "websockets" ]
- trusted_subnets: [ "10.0.0.0/8", "127.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "::1/128", "fc00::/7", "fe80::/10" ]
- pool:
- num_workers: 2
- max_jobs: 0
- allocate_timeout: 60s
- destroy_timeout: 60s
+ address: 127.0.0.1:13235
+ max_request_size: 1024
+ middleware: ["websockets"]
+ trusted_subnets:
+ [
+ "10.0.0.0/8",
+ "127.0.0.0/8",
+ "172.16.0.0/12",
+ "192.168.0.0/16",
+ "::1/128",
+ "fc00::/7",
+ "fe80::/10",
+ ]
+ pool:
+ num_workers: 2
+ max_jobs: 0
+ allocate_timeout: 60s
+ destroy_timeout: 60s
-redis:
- addrs:
- - "127.0.0.1:6379"
+test:
+ addrs:
+ - "127.0.0.1:6379"
broadcast:
- test:
- driver: redis
+ test:
+ driver: redis
websockets:
- broker: test
- allowed_origin: "*"
- path: "/ws"
+ broker: test
+ allowed_origin: "*"
+ path: "/ws"
logs:
- mode: development
- level: error
+ mode: development
+ level: error
endure:
- grace_period: 120s
- print_graph: false
- log_level: error
+ grace_period: 120s
+ print_graph: false
+ log_level: error
diff --git a/tests/plugins/websockets/configs/.rr-websockets-stop.yaml b/tests/plugins/websockets/configs/.rr-websockets-stop.yaml
index 5377aef2..af1f57d4 100644
--- a/tests/plugins/websockets/configs/.rr-websockets-stop.yaml
+++ b/tests/plugins/websockets/configs/.rr-websockets-stop.yaml
@@ -1,38 +1,49 @@
rpc:
- listen: tcp://127.0.0.1:6001
+ listen: tcp://127.0.0.1:6001
server:
- command: "php ../../worker-stop.php"
- user: ""
- group: ""
- relay: "pipes"
- relay_timeout: "20s"
+ command: "php ../../worker-stop.php"
+ user: ""
+ group: ""
+ relay: "pipes"
+ relay_timeout: "20s"
http:
- address: 127.0.0.1:11114
- max_request_size: 1024
- middleware: [ "websockets" ]
- trusted_subnets: [ "10.0.0.0/8", "127.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "::1/128", "fc00::/7", "fe80::/10" ]
- pool:
- num_workers: 2
- max_jobs: 0
- allocate_timeout: 60s
- destroy_timeout: 60s
+ address: 127.0.0.1:11114
+ max_request_size: 1024
+ middleware: ["websockets"]
+ trusted_subnets:
+ [
+ "10.0.0.0/8",
+ "127.0.0.0/8",
+ "172.16.0.0/12",
+ "192.168.0.0/16",
+ "::1/128",
+ "fc00::/7",
+ "fe80::/10",
+ ]
+ pool:
+ num_workers: 2
+ max_jobs: 0
+ allocate_timeout: 60s
+ destroy_timeout: 60s
broadcast:
- test:
- driver: memory
+ test:
+ driver: memory
+ config:
+ placeholder: ""
websockets:
- broker: test
- allowed_origin: "*"
- path: "/ws"
+ broker: test
+ allowed_origin: "*"
+ path: "/ws"
logs:
- mode: development
- level: error
+ mode: development
+ level: error
endure:
- grace_period: 120s
- print_graph: false
- log_level: error
+ grace_period: 120s
+ print_graph: false
+ log_level: error