Cleaned up the testing.
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 2s

This commit is contained in:
Jeff Baskin 2025-12-23 22:15:49 -05:00
parent d06c228c81
commit 97df1a8ece
3 changed files with 285 additions and 179 deletions

View File

@ -1,15 +1,11 @@
mod message;
use message::{
Action, Addition, CalcValue, Calculation, Clock, CreateDoc, Delete, DocDef, DocFuncType, Field,
FieldType, Include, IndexType, Message, Name, NameType, Operand, Path, Queue, RegMsg, Register,
Session, Update,
Action, Addition, CalcValue, Calculation, Clock, CreateDoc, Field, FieldType, Include, Message,
Name, NameType, Operand, Path, Queue, RegMsg, Register, Session,
};
pub use message::{MsgAction, Query};
use std::{
sync::mpsc::{channel, Receiver},
time::Duration,
};
use std::sync::mpsc::{channel, Receiver};
use uuid::Uuid;
#[derive(Clone)]
@ -19,7 +15,7 @@ pub struct MoreThanText {
impl MoreThanText {
pub fn new() -> Self {
let mut queue = Queue::new();
let queue = Queue::new();
Clock::start(queue.clone());
CreateDoc::start(queue.clone());
let session = Session::new();
@ -62,8 +58,9 @@ impl MoreThanText {
Ok(id) => {
let mut query = Query::new();
let mut calc = Calculation::new(Operand::Equal);
calc.add_value(CalcValue::Existing(FieldType::Uuid));
calc.add_value(id);
calc.add_value(CalcValue::Existing(FieldType::Uuid))
.unwrap();
calc.add_value(id).unwrap();
query.add(Name::english("id"), calc);
query.into()
}

View File

@ -52,6 +52,7 @@ async fn create_app(state: MoreThanText) -> Router {
.with_state(state)
}
#[allow(dead_code)]
#[derive(Clone)]
struct SessionID(Uuid);
@ -82,21 +83,21 @@ where
}
async fn mtt_conn(
sess_id: SessionID,
_sess_id: SessionID,
method: Method,
path: Path<HashMap<String, String>>,
state: State<MoreThanText>,
body: String,
_body: String,
) -> impl IntoResponse {
let (tx, mut rx) = channel(1);
let action = match method {
let _action = match method {
Method::GET => MsgAction::Query(Query::new()),
//Method::GET => ActionType::Get,
//Method::POST => ActionType::Add,
//Method::PATCH => ActionType::Update,
_ => unreachable!("reouter should prevent this"),
};
let doc = match path.get("document") {
let _doc = match path.get("document") {
Some(result) => result.clone(),
None => "root".to_string(),
};

File diff suppressed because it is too large Load Diff