Moved failed to find document into lib tests.
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 1s

This commit is contained in:
2026-02-25 13:44:43 -05:00
parent 5251689158
commit 97f9d24330
8 changed files with 50 additions and 37 deletions

View File

@@ -1139,7 +1139,7 @@ mod document_files {
let result = test_doc.get_receiver().recv_timeout(TIMEOUT).unwrap();
match result.get_action() {
MsgAction::Error(err) => match err.get_error_ids().back().unwrap() {
ErrorID::NameNotFound => {}
ErrorID::NameNotFound(_) => {}
_ => unreachable!("got {:?}: should have been document field not found.", err),
},
_ => unreachable!("got {:?}: should have been an error", result.get_action()),
@@ -1449,7 +1449,7 @@ mod document_files {
let action = result.get_action();
match action {
MsgAction::Error(data) => match data.get_error_ids().back().unwrap() {
ErrorID::NameNotFound => {}
ErrorID::NameNotFound(_) => {}
_ => unreachable!("got {:?}: should been field not found", data),
},
_ => unreachable!("got {:?}: should have been a error", action),
@@ -1761,7 +1761,7 @@ mod document_files {
let action = result.get_action();
match action {
MsgAction::Error(err) => match err.get_error_ids().back().unwrap() {
ErrorID::NameNotFound => {}
ErrorID::NameNotFound(_) => {}
_ => unreachable!("got {:?}: should have gotten an missing field", err),
},
_ => unreachable!("got {:?}: should have gotten an error", action),
@@ -2084,7 +2084,7 @@ mod document_files {
let action = result.get_action();
match action {
MsgAction::Error(err) => match err.get_error_ids().back().unwrap() {
ErrorID::NameNotFound => {}
ErrorID::NameNotFound(_) => {}
_ => unreachable!("got {:?}: should have gotten an missing field", err),
},
_ => unreachable!("got {:?}: should have gotten an error", action),

View File

@@ -408,7 +408,7 @@ mod docdefs {
match docdef.get_field(&name) {
Ok(_) => unreachable!("should return non existant field error"),
Err(err) => match err.get_error_ids().back().unwrap() {
ErrorID::NameNotFound => {}
ErrorID::NameNotFound(_) => {}
_ => unreachable!("got {:?}: should have been document field not found", err),
},
}
@@ -456,7 +456,7 @@ mod docdefs {
match docdef.set_default(&field_name, FieldType::Uuid) {
Ok(_) => unreachable!("should be an error"),
Err(err) => match err.get_error_ids().back().unwrap() {
ErrorID::NameNotFound => {}
ErrorID::NameNotFound(_) => {}
_ => unreachable!("got {:?}: should have been field not found", err),
},
}