Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ newline_style = "Unix"
normalize_comments = true
normalize_doc_attributes = true
wrap_comments = true
condense_wildcard_suffixes = true
2 changes: 1 addition & 1 deletion client/src/keyring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ impl Item {
T: for<'a> std::convert::TryFrom<&'a HashMap<String, String>, Error = crate::SchemaError>,
{
match self {
Self::File(_, _) => T::try_from(&self.attributes().await?)
Self::File(..) => T::try_from(&self.attributes().await?)
.map_err(crate::file::Error::Schema)
.map_err(Into::into),
Self::DBus(_) => T::try_from(&self.attributes().await?)
Expand Down
2 changes: 1 addition & 1 deletion client/src/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ mod tests {
#[cfg(feature = "tokio")]
async fn test_migrate_from_dbus_to_file() {
let temp_dir = tempfile::tempdir().unwrap();
let setup = oo7_server::tests::TestServiceSetup::plain_session(true)
let setup = oo7_daemon::tests::TestServiceSetup::plain_session(true)
.await
.unwrap();

Expand Down
26 changes: 13 additions & 13 deletions client/tests/dbus_collection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async fn create_item(service: Service, encrypted: bool) {
#[tokio::test]
#[cfg(feature = "tokio")]
async fn create_plain_item() {
let setup = oo7_server::tests::TestServiceSetup::plain_session(true)
let setup = oo7_daemon::tests::TestServiceSetup::plain_session(true)
.await
.unwrap();
let service = Service::plain_with_connection(&setup.client_conn)
Expand All @@ -51,7 +51,7 @@ async fn create_plain_item() {
#[tokio::test]
#[cfg(feature = "tokio")]
async fn create_encrypted_item() {
let setup = oo7_server::tests::TestServiceSetup::encrypted_session(true)
let setup = oo7_daemon::tests::TestServiceSetup::encrypted_session(true)
.await
.unwrap();
let service = Service::encrypted_with_connection(&setup.client_conn)
Expand All @@ -63,7 +63,7 @@ async fn create_encrypted_item() {
#[tokio::test]
#[cfg(feature = "tokio")]
async fn attribute_search_patterns() {
let setup = oo7_server::tests::TestServiceSetup::plain_session(true)
let setup = oo7_daemon::tests::TestServiceSetup::plain_session(true)
.await
.unwrap();
let service = Service::plain_with_connection(&setup.client_conn)
Expand Down Expand Up @@ -144,7 +144,7 @@ async fn attribute_search_patterns() {
#[tokio::test]
#[cfg(feature = "tokio")]
async fn items() {
let setup = oo7_server::tests::TestServiceSetup::plain_session(true)
let setup = oo7_daemon::tests::TestServiceSetup::plain_session(true)
.await
.unwrap();
let service = Service::plain_with_connection(&setup.client_conn)
Expand Down Expand Up @@ -193,7 +193,7 @@ async fn items() {
#[tokio::test]
#[cfg(feature = "tokio")]
async fn label_mutation() {
let setup = oo7_server::tests::TestServiceSetup::plain_session(true)
let setup = oo7_daemon::tests::TestServiceSetup::plain_session(true)
.await
.unwrap();
let service = Service::plain_with_connection(&setup.client_conn)
Expand All @@ -215,7 +215,7 @@ async fn label_mutation() {
#[tokio::test]
#[cfg(feature = "tokio")]
async fn collections_list() {
let setup = oo7_server::tests::TestServiceSetup::plain_session(true)
let setup = oo7_daemon::tests::TestServiceSetup::plain_session(true)
.await
.unwrap();
let service = Service::plain_with_connection(&setup.client_conn)
Expand Down Expand Up @@ -252,7 +252,7 @@ async fn collections_list() {
#[tokio::test]
#[cfg(feature = "tokio")]
async fn with_alias() {
let setup = oo7_server::tests::TestServiceSetup::plain_session(true)
let setup = oo7_daemon::tests::TestServiceSetup::plain_session(true)
.await
.unwrap();
let service = Service::plain_with_connection(&setup.client_conn)
Expand Down Expand Up @@ -287,7 +287,7 @@ async fn with_alias() {
#[tokio::test]
#[cfg(feature = "tokio")]
async fn timestamps() {
let setup = oo7_server::tests::TestServiceSetup::plain_session(true)
let setup = oo7_daemon::tests::TestServiceSetup::plain_session(true)
.await
.unwrap();
let service = Service::plain_with_connection(&setup.client_conn)
Expand Down Expand Up @@ -321,7 +321,7 @@ async fn timestamps() {
#[tokio::test]
#[cfg(feature = "tokio")]
async fn deleted_error() {
let setup = oo7_server::tests::TestServiceSetup::plain_session(true)
let setup = oo7_daemon::tests::TestServiceSetup::plain_session(true)
.await
.unwrap();
let service = Service::plain_with_connection(&setup.client_conn)
Expand Down Expand Up @@ -391,7 +391,7 @@ async fn deleted_error() {
#[tokio::test]
#[cfg(feature = "tokio")]
async fn lock_unlock() {
let setup = oo7_server::tests::TestServiceSetup::plain_session(false)
let setup = oo7_daemon::tests::TestServiceSetup::plain_session(false)
.await
.unwrap();
let service = Service::plain_with_connection(&setup.client_conn)
Expand Down Expand Up @@ -420,7 +420,7 @@ async fn lock_unlock() {
#[tokio::test]
#[cfg(feature = "tokio")]
async fn item_created_signal() {
let setup = oo7_server::tests::TestServiceSetup::plain_session(true)
let setup = oo7_daemon::tests::TestServiceSetup::plain_session(true)
.await
.unwrap();
let service = Service::plain_with_connection(&setup.client_conn)
Expand Down Expand Up @@ -467,7 +467,7 @@ async fn item_created_signal() {
#[tokio::test]
#[cfg(feature = "tokio")]
async fn item_changed_signal() {
let setup = oo7_server::tests::TestServiceSetup::plain_session(true)
let setup = oo7_daemon::tests::TestServiceSetup::plain_session(true)
.await
.unwrap();
let service = Service::plain_with_connection(&setup.client_conn)
Expand Down Expand Up @@ -515,7 +515,7 @@ async fn item_changed_signal() {
#[tokio::test]
#[cfg(feature = "tokio")]
async fn item_deleted_signal() {
let setup = oo7_server::tests::TestServiceSetup::plain_session(true)
let setup = oo7_daemon::tests::TestServiceSetup::plain_session(true)
.await
.unwrap();
let service = Service::plain_with_connection(&setup.client_conn)
Expand Down
24 changes: 12 additions & 12 deletions client/tests/dbus_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use oo7::dbus::Service;
#[tokio::test]
#[cfg(feature = "tokio")]
async fn label_mutation() {
let setup = oo7_server::tests::TestServiceSetup::plain_session(true)
let setup = oo7_daemon::tests::TestServiceSetup::plain_session(true)
.await
.unwrap();
let service = Service::plain_with_connection(&setup.client_conn)
Expand Down Expand Up @@ -39,7 +39,7 @@ async fn label_mutation() {
#[tokio::test]
#[cfg(feature = "tokio")]
async fn secret_mutation() {
let setup = oo7_server::tests::TestServiceSetup::plain_session(true)
let setup = oo7_daemon::tests::TestServiceSetup::plain_session(true)
.await
.unwrap();
let service = Service::plain_with_connection(&setup.client_conn)
Expand Down Expand Up @@ -73,7 +73,7 @@ async fn secret_mutation() {
#[tokio::test]
#[cfg(feature = "tokio")]
async fn secret_mutation_encrypted() {
let setup = oo7_server::tests::TestServiceSetup::encrypted_session(true)
let setup = oo7_daemon::tests::TestServiceSetup::encrypted_session(true)
.await
.unwrap();
let service = Service::encrypted_with_connection(&setup.client_conn)
Expand Down Expand Up @@ -107,7 +107,7 @@ async fn secret_mutation_encrypted() {
#[tokio::test]
#[cfg(feature = "tokio")]
async fn attributes_mutation() {
let setup = oo7_server::tests::TestServiceSetup::plain_session(true)
let setup = oo7_daemon::tests::TestServiceSetup::plain_session(true)
.await
.unwrap();
let service = Service::plain_with_connection(&setup.client_conn)
Expand Down Expand Up @@ -155,7 +155,7 @@ async fn attributes_mutation() {
#[tokio::test]
#[cfg(feature = "tokio")]
async fn text_secret_type() {
let setup = oo7_server::tests::TestServiceSetup::plain_session(true)
let setup = oo7_daemon::tests::TestServiceSetup::plain_session(true)
.await
.unwrap();
let service = Service::plain_with_connection(&setup.client_conn)
Expand All @@ -182,7 +182,7 @@ async fn text_secret_type() {
#[tokio::test]
#[cfg(feature = "tokio")]
async fn blob_secret_type() {
let setup = oo7_server::tests::TestServiceSetup::plain_session(true)
let setup = oo7_daemon::tests::TestServiceSetup::plain_session(true)
.await
.unwrap();
let service = Service::plain_with_connection(&setup.client_conn)
Expand Down Expand Up @@ -213,7 +213,7 @@ async fn blob_secret_type() {
#[tokio::test]
#[cfg(feature = "tokio")]
async fn timestamps() {
let setup = oo7_server::tests::TestServiceSetup::plain_session(true)
let setup = oo7_daemon::tests::TestServiceSetup::plain_session(true)
.await
.unwrap();
let service = Service::plain_with_connection(&setup.client_conn)
Expand Down Expand Up @@ -256,7 +256,7 @@ async fn timestamps() {
#[tokio::test]
#[cfg(feature = "tokio")]
async fn deleted_error() {
let setup = oo7_server::tests::TestServiceSetup::plain_session(true)
let setup = oo7_daemon::tests::TestServiceSetup::plain_session(true)
.await
.unwrap();
let service = Service::plain_with_connection(&setup.client_conn)
Expand Down Expand Up @@ -329,7 +329,7 @@ async fn deleted_error() {
#[tokio::test]
#[cfg(feature = "tokio")]
async fn lock_unlock() {
let setup = oo7_server::tests::TestServiceSetup::plain_session(true)
let setup = oo7_daemon::tests::TestServiceSetup::plain_session(true)
.await
.unwrap();
let service = Service::plain_with_connection(&setup.client_conn)
Expand Down Expand Up @@ -360,7 +360,7 @@ async fn lock_unlock() {
#[tokio::test]
#[cfg(feature = "tokio")]
async fn item_created_signal() {
let setup = oo7_server::tests::TestServiceSetup::plain_session(true)
let setup = oo7_daemon::tests::TestServiceSetup::plain_session(true)
.await
.unwrap();
let service = Service::plain_with_connection(&setup.client_conn)
Expand Down Expand Up @@ -407,7 +407,7 @@ async fn item_created_signal() {
#[tokio::test]
#[cfg(feature = "tokio")]
async fn item_changed_signal() {
let setup = oo7_server::tests::TestServiceSetup::plain_session(true)
let setup = oo7_daemon::tests::TestServiceSetup::plain_session(true)
.await
.unwrap();
let service = Service::plain_with_connection(&setup.client_conn)
Expand Down Expand Up @@ -455,7 +455,7 @@ async fn item_changed_signal() {
#[tokio::test]
#[cfg(feature = "tokio")]
async fn item_deleted_signal() {
let setup = oo7_server::tests::TestServiceSetup::plain_session(true)
let setup = oo7_daemon::tests::TestServiceSetup::plain_session(true)
.await
.unwrap();
let service = Service::plain_with_connection(&setup.client_conn)
Expand Down
14 changes: 7 additions & 7 deletions client/tests/dbus_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use oo7::dbus::Service;
#[tokio::test]
#[cfg(feature = "tokio")]
async fn create_collection() {
let setup = oo7_server::tests::TestServiceSetup::plain_session(true)
let setup = oo7_daemon::tests::TestServiceSetup::plain_session(true)
.await
.unwrap();
let service = Service::plain_with_connection(&setup.client_conn)
Expand Down Expand Up @@ -32,7 +32,7 @@ async fn create_collection() {
#[tokio::test]
#[cfg(feature = "tokio")]
async fn default_collections() {
let setup = oo7_server::tests::TestServiceSetup::plain_session(true)
let setup = oo7_daemon::tests::TestServiceSetup::plain_session(true)
.await
.unwrap();
let service = Service::plain_with_connection(&setup.client_conn)
Expand All @@ -46,7 +46,7 @@ async fn default_collections() {
#[tokio::test]
#[cfg(feature = "tokio")]
async fn encrypted_session() {
let setup = oo7_server::tests::TestServiceSetup::encrypted_session(true)
let setup = oo7_daemon::tests::TestServiceSetup::encrypted_session(true)
.await
.unwrap();
let service = Service::encrypted_with_connection(&setup.client_conn)
Expand All @@ -58,7 +58,7 @@ async fn encrypted_session() {
#[tokio::test]
#[cfg(feature = "tokio")]
async fn plain_session() {
let setup = oo7_server::tests::TestServiceSetup::plain_session(true)
let setup = oo7_daemon::tests::TestServiceSetup::plain_session(true)
.await
.unwrap();
let service = Service::plain_with_connection(&setup.client_conn)
Expand All @@ -70,7 +70,7 @@ async fn plain_session() {
#[tokio::test]
#[cfg(feature = "tokio")]
async fn collection_created_signal() {
let setup = oo7_server::tests::TestServiceSetup::plain_session(true)
let setup = oo7_daemon::tests::TestServiceSetup::plain_session(true)
.await
.unwrap();
let service = Service::plain_with_connection(&setup.client_conn)
Expand Down Expand Up @@ -107,7 +107,7 @@ async fn collection_created_signal() {
#[tokio::test]
#[cfg(feature = "tokio")]
async fn collection_changed_signal() {
let setup = oo7_server::tests::TestServiceSetup::plain_session(true)
let setup = oo7_daemon::tests::TestServiceSetup::plain_session(true)
.await
.unwrap();
let service = Service::plain_with_connection(&setup.client_conn)
Expand Down Expand Up @@ -148,7 +148,7 @@ async fn collection_changed_signal() {
#[tokio::test]
#[cfg(feature = "tokio")]
async fn collection_deleted_signal() {
let setup = oo7_server::tests::TestServiceSetup::plain_session(true)
let setup = oo7_daemon::tests::TestServiceSetup::plain_session(true)
.await
.unwrap();
let service = Service::plain_with_connection(&setup.client_conn)
Expand Down
4 changes: 2 additions & 2 deletions client/tests/keyring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use tempfile::tempdir;

async fn all_backends(
temp_dir: &tempfile::TempDir,
) -> (oo7_server::tests::TestServiceSetup, Vec<Keyring>) {
) -> (oo7_daemon::tests::TestServiceSetup, Vec<Keyring>) {
let mut backends = Vec::new();

let keyring_path = temp_dir.path().join("test.keyring");
Expand All @@ -15,7 +15,7 @@ async fn all_backends(
.unwrap();
backends.push(unlocked);

let setup = oo7_server::tests::TestServiceSetup::plain_session(true)
let setup = oo7_daemon::tests::TestServiceSetup::plain_session(true)
.await
.unwrap();

Expand Down
2 changes: 1 addition & 1 deletion server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ name = "oo7-daemon"
path = "src/main.rs"

[lib]
name = "oo7_server"
name = "oo7_daemon"
path = "src/lib.rs"
test = false

Expand Down
2 changes: 1 addition & 1 deletion server/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Library interface for oo7_server
// Library interface for oo7_daemon
// Only expose test utilities when the test-util feature is enabled
#![allow(unused)]
#![deny(unsafe_code)]
Expand Down
Loading
Loading