Skip to content

Commit 48eec3d

Browse files
authored
Merge branch 'project-chip:v1.4-branch' into v1.4-branch
2 parents 5416391 + 9d596a0 commit 48eec3d

31 files changed

+1424
-281
lines changed

.github/.wordlist.txt

+5
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,7 @@ CurrentHue
326326
CurrentLevel
327327
CurrentSaturation
328328
customAcl
329+
customizable
329330
customizations
330331
cvfJ
331332
cxx
@@ -1039,6 +1040,7 @@ otatesting
10391040
otaURL
10401041
OTBR
10411042
otcli
1043+
OU
10421044
outform
10431045
outgoingCommands
10441046
overridable
@@ -1150,6 +1152,7 @@ PyObject
11501152
pypi
11511153
PyRun
11521154
pytest
1155+
PYTHONPATH
11531156
QEMU
11541157
Qorvo
11551158
QPG
@@ -1326,6 +1329,7 @@ SRP
13261329
SRV
13271330
SSBL
13281331
SSID
1332+
SSL
13291333
startoffset
13301334
StartScan
13311335
startsWith
@@ -1490,6 +1494,7 @@ unfocus
14901494
Unicast
14911495
UniFlash
14921496
UnitLocalization
1497+
unittest
14931498
unpair
14941499
unprovisioned
14951500
Unsecure

.vscode/launch.json

+33
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,39 @@
44
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
55
"version": "0.2.0",
66
"configurations": [
7+
{
8+
"name": "Python: Mock Server Tests",
9+
"type": "debugpy",
10+
"request": "launch",
11+
"module": "unittest",
12+
"args": [
13+
"${workspaceFolder}/integrations/mock_server/tests/test_mock_server.py"
14+
],
15+
"env": {
16+
"PYTHONPATH": "${workspaceFolder}/integrations/mock_server/src:${PYTHONPATH}"
17+
},
18+
"console": "integratedTerminal",
19+
"cwd": "${workspaceFolder}"
20+
},
21+
{
22+
"name": "Python Debugger: test_dcl_server",
23+
"type": "debugpy",
24+
"request": "launch",
25+
"program": "${workspaceFolder}/integrations/mock_server/src/main.py",
26+
"args": [
27+
"--port",
28+
"8443",
29+
"--config",
30+
"${workspaceFolder}/integrations/mock_server/configurations/server_config.json",
31+
"--routing-config-dir",
32+
"${workspaceFolder}/integrations/mock_server/configurations/fake_distributed_compliance_ledger",
33+
"--cert",
34+
"${workspaceFolder}/server.crt",
35+
"--key",
36+
"${workspaceFolder}/server.key"
37+
],
38+
"console": "integratedTerminal"
39+
},
740
{
841
"name": "Attach to running process",
942
"type": "lldb",

examples/chip-tool/commands/dcl/test_dcl_server.py

-245
This file was deleted.

integrations/docker/images/chip-cert-bins/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ COPY --from=chip-build-cert-bins /root/connectedhomeip/out/fabric-bridge-app fab
315315
COPY --from=chip-build-cert-bins /root/connectedhomeip/out/fabric-admin fabric-admin
316316
COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-lighting-data-model-no-unique-id-app chip-lighting-data-model-no-unique-id-app
317317
COPY --from=chip-build-cert-bins /root/connectedhomeip/out/matter-network-manager-app matter-network-manager-app
318-
COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-terms-and-conditions-app apps/chip-terms-and-conditions-app
318+
COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-terms-and-conditions-app chip-terms-and-conditions-app
319319

320320
# Stage 3.1: Setup the Matter Python environment
321321
COPY --from=chip-build-cert-bins /root/connectedhomeip/out/python_lib python_lib

integrations/mock_server/README.md

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Mock HTTP/HTTPS Server
2+
3+
## Overview
4+
5+
This project provides a configurable mock HTTP/HTTPS server designed for API
6+
testing, dynamic response generation, and automated request handling. It
7+
supports static responses, dynamic custom response handlers, query parameter
8+
matching, request body validation (including regex), and both HTTP and HTTPS
9+
protocols.
10+
11+
## Setup
12+
13+
```bash
14+
openssl req -x509 -newkey rsa:2048 -keyout server.key -out server.crt -days 365 -nodes -subj "/C=US/ST= /L= /O= /OU= /CN=localhost"
15+
```
16+
17+
## Features
18+
19+
### Server Functionality
20+
21+
- Secure HTTPS with TLS support
22+
- CLI-driven execution with customizable options (port, configuration files,
23+
SSL options)
24+
- Handles GET, POST, PUT, and DELETE requests
25+
- Concurrent request handling via threading
26+
27+
### Route Matching
28+
29+
- Exact path and wildcard (\*) path matching
30+
- Query parameter validation
31+
- Priority-based route matching
32+
33+
### Configuration
34+
35+
- Main server configuration file
36+
- Separate routing configuration directory
37+
- JSON-based configuration format
38+
- Dynamic route loading
39+
40+
### Security & Logging
41+
42+
- TLS encryption (HTTPS only)
43+
- Structured logging with DEBUG level
44+
- Graceful error handling for invalid routes
45+
46+
## Running Tests
47+
48+
### Test Execution
49+
50+
You can run the tests using one of these methods:
51+
52+
1. Using Python unittest with PYTHONPATH:
53+
54+
```bash
55+
PYTHONPATH=$PYTHONPATH:/workspace/connectedhomeip/integrations/mock_server/src python3 -m unittest integrations/mock_server/tests/test_mock_server.py
56+
```

0 commit comments

Comments
 (0)