Fix tests

Also remove certs that were incorrectly added
next
Sayan Nandan 3 years ago
parent 104e4e8f2d
commit b52f0d42ca
No known key found for this signature in database
GPG Key ID: 8BC07A0A4D41DD52

3
.gitignore vendored

@ -11,4 +11,5 @@ snapstore.partmap
.sky_history
.sky_pid
.devcontainer
*.deb
*.deb
*.pem

@ -196,7 +196,7 @@ action! {
None => conwrite!(con, groups::NIL)?,
}
}
None => conwrite!(con, groups::ACTION_ERR)?,
None => aerr!(con),
}
}
_ => conwrite!(con, groups::UNKNOWN_ACTION)?,

@ -137,7 +137,7 @@ macro_rules! conwrite {
#[macro_export]
macro_rules! aerr {
($con:expr, aerr) => {
($con:expr) => {
return conwrite!($con, crate::protocol::responses::groups::ACTION_ERR)
};
}

@ -62,7 +62,7 @@ action! {
_ => conwrite!(con, responses::groups::UNKNOWN_INSPECT_QUERY)?,
}
}
None => aerr!(con, aerr),
None => aerr!(con),
}
Ok(())
}
@ -89,7 +89,7 @@ action! {
writer.write_element(tbl).await?;
}
},
None => aerr!(con, aerr),
None => aerr!(con),
}
Ok(())
}
@ -102,7 +102,7 @@ action! {
let entity = handle_entity!(con, entity);
conwrite!(con, get_tbl!(entity, handle, con).describe_self())?;
},
None => aerr!(con, aerr),
None => aerr!(con),
}
Ok(())
}

@ -380,7 +380,7 @@ mod __private {
runeq!(
con,
q,
Element::RespCode(RespCode::ErrorString("listmap-bad-index".to_owned()))
Element::RespCode(RespCode::ErrorString("bad-list-index".to_owned()))
)
}
@ -396,20 +396,20 @@ mod __private {
runeq!(
con,
q,
Element::RespCode(RespCode::ErrorString("listmap-bad-index".to_owned()))
Element::RespCode(RespCode::ErrorString("bad-list-index".to_owned()))
)
}
async fn test_list_range_parse_fail() {
let q = query!("lget", "mylist", "1", "2a");
let q = query!("lget", "mylist", "range", "1", "2a");
runeq!(con, q, Element::RespCode(RespCode::Wrongtype));
let q = query!("lget", "mylist", "2a");
let q = query!("lget", "mylist", "range", "2a");
runeq!(con, q, Element::RespCode(RespCode::Wrongtype));
// now do the same with an existing key
lset!(con, "mylist", "a", "b", "c");
let q = query!("lget", "mylist", "1", "2a");
let q = query!("lget", "mylist", "range", "1", "2a");
runeq!(con, q, Element::RespCode(RespCode::Wrongtype));
let q = query!("lget", "mylist", "2a");
let q = query!("lget", "mylist", "range", "2a");
runeq!(con, q, Element::RespCode(RespCode::Wrongtype));
}

Loading…
Cancel
Save