File
Blob: src/workerd/api/tests/connect-handler-test.wd-test
| 1 | using Workerd = import "/workerd/workerd.capnp"; |
| 2 | |
| 3 | const unitTests :Workerd.Config = ( |
| 4 | services = [ |
| 5 | ( name = "connect-handler-test", |
| 6 | worker = ( |
| 7 | modules = [ |
| 8 | (name = "worker", esModule = embed "connect-handler-test.js"), |
| 9 | ], |
| 10 | compatibilityFlags = ["nodejs_compat_v2", "experimental"], |
| 11 | bindings = [ |
| 12 | (name = "TARGET", service = ( |
| 13 | name = "connect-handler-test-local-address-endpoint", |
| 14 | entrypoint = "LocalAddressEndpoint")), |
| 15 | ], |
| 16 | ) |
| 17 | ), |
| 18 | ( name = "connect-handler-test-local-address-endpoint", |
| 19 | worker = ( |
| 20 | modules = [ |
| 21 | (name = "worker", esModule = embed "connect-handler-test-proxy.js"), |
| 22 | ], |
| 23 | compatibilityFlags = ["nodejs_compat_v2", "experimental"], |
| 24 | ) |
| 25 | ), |
| 26 | ( name = "connect-handler-test-proxy", |
| 27 | worker = ( |
| 28 | modules = [ |
| 29 | (name = "worker", esModule = embed "connect-handler-test-proxy.js"), |
| 30 | ], |
| 31 | compatibilityFlags = ["nodejs_compat_v2", "experimental"], |
| 32 | ) |
| 33 | ), |
| 34 | ( name = "connect-handler-test-endpoint", |
| 35 | worker = ( |
| 36 | modules = [ |
| 37 | (name = "worker", esModule = embed "connect-handler-test-proxy.js"), |
| 38 | ], |
| 39 | compatibilityFlags = ["nodejs_compat_v2", "experimental"], |
| 40 | ) |
| 41 | ), |
| 42 | ( name = "internet", network = ( allow = ["private"] ) ) |
| 43 | ], |
| 44 | sockets = [ |
| 45 | (name = "tcp", address = "*:8081", tcp = (), service = "connect-handler-test"), |
| 46 | (name = "tcp", address = "*:8082", tcp = (), service = (name = "connect-handler-test-proxy", entrypoint = "ConnectProxy")), |
| 47 | (name = "tcp", address = "*:8083", tcp = (), service = (name = "connect-handler-test-endpoint", entrypoint = "ConnectEndpoint")) |
| 48 | ] |
| 49 | ); |