Skip to content

Commit c6656ba

Browse files
author
陈云亮
committed
test(tests): 增强SSL模式测试说明并调整类型标记
- 在SSL模式测试中添加详细注释,说明GaussDB支持的SSL模式及环境变量设置方法 - 为shapely类型测试添加gaussdb_skip标记,跳过GaussDB USTORE存储模式下不支持的PostGIS测试 - 改进测试代码的可读性和维护性
1 parent a3f892c commit c6656ba

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

tests/test_sslmode.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,15 @@
1010

1111
@pytest.fixture(params=["require", "verify-ca"])
1212
def dsn(request):
13-
"""Retrieve DSN from environment variable based on SSL mode."""
13+
"""Retrieve DSN from environment variable based on SSL mode.
14+
15+
GaussDB SSL modes supported:
16+
- require: Encrypted connection without certificate verification
17+
- verify-ca: Encrypted connection with CA certificate verification
18+
19+
Set GAUSSDB_TEST_DSN with appropriate sslmode to run these tests:
20+
export GAUSSDB_TEST_DSN="...sslmode=require..."
21+
"""
1422
dsn = os.environ.get("GAUSSDB_TEST_DSN")
1523
if not dsn:
1624
raise ValueError("GAUSSDB_TEST_DSN environment variable not set")

tests/types/test_shapely.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def get_srid(obj): # type: ignore[no-redef]
2525
pytestmark = [
2626
pytest.mark.postgis,
2727
pytest.mark.crdb("skip"),
28+
pytest.mark.gaussdb_skip("PostGIS not supported on GaussDB USTORE storage mode"),
2829
]
2930

3031
SAMPLE_POINT = Point(1.2, 3.4)

0 commit comments

Comments
 (0)