diff options
author | Valery Piashchynski <[email protected]> | 2021-09-10 19:05:37 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-09-10 19:05:37 +0300 |
commit | e94a80d4586d5a5fedc2edab850c5c8bad93395f (patch) | |
tree | 4272054647725274abb5ee69e355c1e4262760ea /tests/plugins/websockets/configs | |
parent | 8fa86886bd5b3c12cf161fb2c1cdd9a2cd53d1bf (diff) |
fix issue with incorrectly parsing local and global configuration
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'tests/plugins/websockets/configs')
8 files changed, 301 insertions, 213 deletions
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 |