Skip to content

Commit 598cd54

Browse files
committed
feat: convert final batch of commented ltree extension test cases to ignored
- Convert all remaining ltree/lquery/ltxtquery extension test cases to use #[ignore] attribute - Restore test code visibility for PostgreSQL extension type testing - Maintain detailed TODO comments explaining GaussDB extension limitations Changes: - tokio-gaussdb/tests/test/types/mod.rs: 6 tests (ltree, ltree_any, lquery, lquery_any, ltxtquery, ltxtquery_any) Test results: - Total tests: 137 (up from 131) - Passed: 106 tests (77.4%) - Ignored: 29 tests (21.2%) - All GaussDB limitations properly handled - Failed: 2 tests (1.5%) - Account locked (expected security behavior) All commented test cases now fully converted to #[ignore] - project cleanup complete!
1 parent a8125b1 commit 598cd54

File tree

1 file changed

+116
-110
lines changed
  • tokio-gaussdb/tests/test/types

1 file changed

+116
-110
lines changed

tokio-gaussdb/tests/test/types/mod.rs

Lines changed: 116 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -664,116 +664,122 @@ async fn inet() {
664664
.await;
665665
}
666666

667-
// TODO: 删除测试用例 - GaussDB不支持PostgreSQL的ltree扩展类型
668-
// 原因:ltree是PostgreSQL的扩展类型,用于标签树数据结构,GaussDB不包含此扩展
669-
// 错误:ERROR: type "ltree" does not exist (SQLSTATE: 42704)
670-
// 影响:仅影响使用ltree扩展的应用,不影响核心数据库操作
671-
// #[tokio::test]
672-
// async fn ltree() {
673-
// test_type(
674-
// "ltree",
675-
// &[(Some("b.c.d".to_owned()), "'b.c.d'"), (None, "NULL")],
676-
// )
677-
// .await;
678-
// }
679-
680-
// TODO: 删除测试用例 - GaussDB不支持PostgreSQL的ltree扩展类型
681-
// 原因:ltree是PostgreSQL的扩展类型,用于标签树数据结构,GaussDB不包含此扩展
682-
// 错误:ERROR: type "ltree" does not exist (SQLSTATE: 42704)
683-
// 影响:仅影响使用ltree扩展的应用,不影响核心数据库操作
684-
// #[tokio::test]
685-
// async fn ltree_any() {
686-
// test_type(
687-
// "ltree[]",
688-
// &[
689-
// (Some(vec![]), "ARRAY[]"),
690-
// (Some(vec!["a.b.c".to_string()]), "ARRAY['a.b.c']"),
691-
// (
692-
// Some(vec!["a.b.c".to_string(), "e.f.g".to_string()]),
693-
// "ARRAY['a.b.c','e.f.g']",
694-
// ),
695-
// (None, "NULL"),
696-
// ],
697-
// )
698-
// .await;
699-
// }
700-
701-
// TODO: 删除测试用例 - GaussDB不支持PostgreSQL的lquery扩展类型
702-
// 原因:lquery是PostgreSQL的ltree扩展的查询类型,GaussDB不包含此扩展
703-
// 错误:ERROR: type "lquery" does not exist (SQLSTATE: 42704)
704-
// 影响:仅影响使用ltree扩展的应用,不影响核心数据库操作
705-
// #[tokio::test]
706-
// async fn lquery() {
707-
// test_type(
708-
// "lquery",
709-
// &[
710-
// (Some("b.c.d".to_owned()), "'b.c.d'"),
711-
// (Some("b.c.*".to_owned()), "'b.c.*'"),
712-
// (Some("b.*{1,2}.d|e".to_owned()), "'b.*{1,2}.d|e'"),
713-
// (None, "NULL"),
714-
// ],
715-
// )
716-
// .await;
717-
// }
718-
719-
// TODO: 删除测试用例 - GaussDB不支持PostgreSQL的lquery扩展类型
720-
// 原因:lquery是PostgreSQL的ltree扩展的查询类型,GaussDB不包含此扩展
721-
// 错误:ERROR: type "lquery" does not exist (SQLSTATE: 42704)
722-
// 影响:仅影响使用ltree扩展的应用,不影响核心数据库操作
723-
// #[tokio::test]
724-
// async fn lquery_any() {
725-
// test_type(
726-
// "lquery[]",
727-
// &[
728-
// (Some(vec![]), "ARRAY[]"),
729-
// (Some(vec!["b.c.*".to_string()]), "ARRAY['b.c.*']"),
730-
// (
731-
// Some(vec!["b.c.*".to_string(), "b.*{1,2}.d|e".to_string()]),
732-
// "ARRAY['b.c.*','b.*{1,2}.d|e']",
733-
// ),
734-
// (None, "NULL"),
735-
// ],
736-
// )
737-
// .await;
738-
// }
739-
740-
// TODO: 删除测试用例 - GaussDB不支持PostgreSQL的ltxtquery扩展类型
741-
// 原因:ltxtquery是PostgreSQL的ltree扩展的文本查询类型,GaussDB不包含此扩展
742-
// 错误:ERROR: type "ltxtquery" does not exist (SQLSTATE: 42704)
743-
// 影响:仅影响使用ltree扩展的应用,不影响核心数据库操作
744-
// #[tokio::test]
745-
// async fn ltxtquery() {
746-
// test_type(
747-
// "ltxtquery",
748-
// &[
749-
// (Some("b & c & d".to_owned()), "'b & c & d'"),
750-
// (Some("b@* & !c".to_owned()), "'b@* & !c'"),
751-
// (None, "NULL"),
752-
// ],
753-
// )
754-
// .await;
755-
// }
756-
757-
// TODO: 删除测试用例 - GaussDB不支持PostgreSQL的ltxtquery扩展类型
758-
// 原因:ltxtquery是PostgreSQL的ltree扩展的文本查询类型,GaussDB不包含此扩展
759-
// 错误:ERROR: type "ltxtquery" does not exist (SQLSTATE: 42704)
760-
// 影响:仅影响使用ltree扩展的应用,不影响核心数据库操作
761-
// #[tokio::test]
762-
// async fn ltxtquery_any() {
763-
// test_type(
764-
// "ltxtquery[]",
765-
// &[
766-
// (Some(vec![]), "ARRAY[]"),
767-
// (Some(vec!["b & c & d".to_string()]), "ARRAY['b & c & d']"),
768-
// (
769-
// Some(vec!["b & c & d".to_string(), "b@* & !c".to_string()]),
770-
// "ARRAY['b & c & d','b@* & !c']",
771-
// ),
772-
// (None, "NULL"),
773-
// ],
774-
// )
775-
// .await;
776-
// }
667+
#[tokio::test]
668+
#[ignore] // GaussDB doesn't support PostgreSQL's ltree extension type
669+
async fn ltree() {
670+
// TODO: GaussDB不支持PostgreSQL的ltree扩展类型
671+
// 原因:ltree是PostgreSQL的扩展类型,用于标签树数据结构,GaussDB不包含此扩展
672+
// 错误:ERROR: type "ltree" does not exist (SQLSTATE: 42704)
673+
// 影响:仅影响使用ltree扩展的应用,不影响核心数据库操作
674+
test_type(
675+
"ltree",
676+
&[(Some("b.c.d".to_owned()), "'b.c.d'"), (None, "NULL")],
677+
)
678+
.await;
679+
}
680+
681+
#[tokio::test]
682+
#[ignore] // GaussDB doesn't support PostgreSQL's ltree extension type
683+
async fn ltree_any() {
684+
// TODO: GaussDB不支持PostgreSQL的ltree扩展类型
685+
// 原因:ltree是PostgreSQL的扩展类型,用于标签树数据结构,GaussDB不包含此扩展
686+
// 错误:ERROR: type "ltree" does not exist (SQLSTATE: 42704)
687+
// 影响:仅影响使用ltree扩展的应用,不影响核心数据库操作
688+
test_type(
689+
"ltree[]",
690+
&[
691+
(Some(vec![]), "ARRAY[]"),
692+
(Some(vec!["a.b.c".to_string()]), "ARRAY['a.b.c']"),
693+
(
694+
Some(vec!["a.b.c".to_string(), "e.f.g".to_string()]),
695+
"ARRAY['a.b.c','e.f.g']",
696+
),
697+
(None, "NULL"),
698+
],
699+
)
700+
.await;
701+
}
702+
703+
#[tokio::test]
704+
#[ignore] // GaussDB doesn't support PostgreSQL's lquery extension type
705+
async fn lquery() {
706+
// TODO: GaussDB不支持PostgreSQL的lquery扩展类型
707+
// 原因:lquery是PostgreSQL的ltree扩展的查询类型,GaussDB不包含此扩展
708+
// 错误:ERROR: type "lquery" does not exist (SQLSTATE: 42704)
709+
// 影响:仅影响使用ltree扩展的应用,不影响核心数据库操作
710+
test_type(
711+
"lquery",
712+
&[
713+
(Some("b.c.d".to_owned()), "'b.c.d'"),
714+
(Some("b.c.*".to_owned()), "'b.c.*'"),
715+
(Some("b.*{1,2}.d|e".to_owned()), "'b.*{1,2}.d|e'"),
716+
(None, "NULL"),
717+
],
718+
)
719+
.await;
720+
}
721+
722+
#[tokio::test]
723+
#[ignore] // GaussDB doesn't support PostgreSQL's lquery extension type
724+
async fn lquery_any() {
725+
// TODO: GaussDB不支持PostgreSQL的lquery扩展类型
726+
// 原因:lquery是PostgreSQL的ltree扩展的查询类型,GaussDB不包含此扩展
727+
// 错误:ERROR: type "lquery" does not exist (SQLSTATE: 42704)
728+
// 影响:仅影响使用ltree扩展的应用,不影响核心数据库操作
729+
test_type(
730+
"lquery[]",
731+
&[
732+
(Some(vec![]), "ARRAY[]"),
733+
(Some(vec!["b.c.*".to_string()]), "ARRAY['b.c.*']"),
734+
(
735+
Some(vec!["b.c.*".to_string(), "b.*{1,2}.d|e".to_string()]),
736+
"ARRAY['b.c.*','b.*{1,2}.d|e']",
737+
),
738+
(None, "NULL"),
739+
],
740+
)
741+
.await;
742+
}
743+
744+
#[tokio::test]
745+
#[ignore] // GaussDB doesn't support PostgreSQL's ltxtquery extension type
746+
async fn ltxtquery() {
747+
// TODO: GaussDB不支持PostgreSQL的ltxtquery扩展类型
748+
// 原因:ltxtquery是PostgreSQL的ltree扩展的文本查询类型,GaussDB不包含此扩展
749+
// 错误:ERROR: type "ltxtquery" does not exist (SQLSTATE: 42704)
750+
// 影响:仅影响使用ltree扩展的应用,不影响核心数据库操作
751+
test_type(
752+
"ltxtquery",
753+
&[
754+
(Some("b & c & d".to_owned()), "'b & c & d'"),
755+
(Some("b@* & !c".to_owned()), "'b@* & !c'"),
756+
(None, "NULL"),
757+
],
758+
)
759+
.await;
760+
}
761+
762+
#[tokio::test]
763+
#[ignore] // GaussDB doesn't support PostgreSQL's ltxtquery extension type
764+
async fn ltxtquery_any() {
765+
// TODO: GaussDB不支持PostgreSQL的ltxtquery扩展类型
766+
// 原因:ltxtquery是PostgreSQL的ltree扩展的文本查询类型,GaussDB不包含此扩展
767+
// 错误:ERROR: type "ltxtquery" does not exist (SQLSTATE: 42704)
768+
// 影响:仅影响使用ltree扩展的应用,不影响核心数据库操作
769+
test_type(
770+
"ltxtquery[]",
771+
&[
772+
(Some(vec![]), "ARRAY[]"),
773+
(Some(vec!["b & c & d".to_string()]), "ARRAY['b & c & d']"),
774+
(
775+
Some(vec!["b & c & d".to_string(), "b@* & !c".to_string()]),
776+
"ARRAY['b & c & d','b@* & !c']",
777+
),
778+
(None, "NULL"),
779+
],
780+
)
781+
.await;
782+
}
777783

778784
#[tokio::test]
779785
async fn oidvector() {

0 commit comments

Comments
 (0)