Skip to content

Commit

Permalink
Merge pull request #1420 from Sakapoi/unitore_fix
Browse files Browse the repository at this point in the history
READY(unitore): fixed tests
  • Loading branch information
Wandalen authored Aug 13, 2024
2 parents 322bec8 + 2c1ad22 commit 97954e6
Show file tree
Hide file tree
Showing 30 changed files with 33 additions and 34 deletions.
3 changes: 1 addition & 2 deletions module/core/mod_interface_meta/src/record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
pub( crate ) mod private
{
use crate::*;
use derive_tools::IsVariant;
use macro_tools::exposed::*;

///
Expand All @@ -18,7 +17,7 @@ pub( crate ) mod private
/// Kind of element.
///
#[ derive( IsVariant, Debug, PartialEq, Eq, Clone, Copy ) ]
#[ derive( Debug, PartialEq, Eq, Clone, Copy ) ]
pub enum ElementType
{
MicroModule( syn::token::Mod ),
Expand Down
2 changes: 1 addition & 1 deletion module/move/unitore/src/action/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use std::path::PathBuf;

use crate::*;
use error_tools::{ untyped::Context, Result };
use error_tools::{ untyped::Context, untyped::Result };
use sled_adapter::FeedStorage;
use entity::
{
Expand Down
2 changes: 1 addition & 1 deletion module/move/unitore/src/action/feed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::*;
use action::{ Report, frame::SelectedEntries };
use sled_adapter::FeedStorage;
use entity::feed::FeedStore;
use error_tools::Result;
use error_tools::untyped::Result;

/// List all feeds from storage.
pub async fn feeds_list( mut storage : FeedStorage< gluesql::sled_storage::SledStorage > ) -> Result< impl Report >
Expand Down
2 changes: 1 addition & 1 deletion module/move/unitore/src/action/frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use entity::
};
use gluesql::prelude::{ Payload, Value, SledStorage };
use feed_config;
use error_tools::{ err, Result };
use error_tools::{ err, untyped::Result };
use action::Report;

// qqq : review the whole project and make sure all names are consitant: actions, commands, its tests
Expand Down
2 changes: 1 addition & 1 deletion module/move/unitore/src/action/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::*;
use gluesql::core::executor::Payload;
use sled_adapter::Store;
use action::Report;
use error_tools::Result;
use error_tools::untyped::Result;

/// Execute query specified in query string.
pub async fn query_execute
Expand Down
2 changes: 1 addition & 1 deletion module/move/unitore/src/action/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::collections::HashMap;
use action::Report;
use sled_adapter::FeedStorage;
use entity::table::TableStore;
use error_tools::Result;
use error_tools::untyped::Result;

/// Get labels of column for specified table.
pub async fn table_list
Expand Down
2 changes: 1 addition & 1 deletion module/move/unitore/src/command/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use gluesql::sled_storage::sled::Config;
use wca::{ Command, Type, VerifiedCommand };
use sled_adapter::FeedStorage;
use action::{ Report, config::{ config_add, config_delete, config_list } };
use error_tools::Result;
use error_tools::untyped::Result;

/// Struct that provides commands for config files.
#[ derive( Debug ) ]
Expand Down
2 changes: 1 addition & 1 deletion module/move/unitore/src/command/feed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use gluesql::sled_storage::sled::Config;
use wca::{ Command, VerifiedCommand };
use sled_adapter::FeedStorage;
use action::{ Report, feed::feeds_list };
use error_tools::Result;
use error_tools::untyped::Result;

/// Struct that provides commands for feed.
#[ derive( Debug ) ]
Expand Down
2 changes: 1 addition & 1 deletion module/move/unitore/src/command/frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use gluesql::sled_storage::sled::Config;
use wca::{ Command, VerifiedCommand };
use sled_adapter::FeedStorage;
use action::{ Report, frame::{ frames_list, frames_download } };
use error_tools::Result;
use error_tools::untyped::Result;

/// Struct that provides commands for frames.
#[ derive( Debug ) ]
Expand Down
2 changes: 1 addition & 1 deletion module/move/unitore/src/command/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use gluesql::sled_storage::sled::Config;
use wca::{ Command, Type, VerifiedCommand };
use sled_adapter::FeedStorage;
use action::{ Report, query::query_execute };
use error_tools::Result;
use error_tools::untyped::Result;

/// Struct that provides commands for queries.
#[ derive( Debug ) ]
Expand Down
2 changes: 1 addition & 1 deletion module/move/unitore/src/command/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use gluesql::sled_storage::sled::Config;
use wca::{ Command, Type, VerifiedCommand };
use sled_adapter::FeedStorage;
use action::{ Report, table::{ table_list, tables_list } };
use error_tools::Result;
use error_tools::untyped::Result;

/// Struct that provides commands for table information.
#[ derive( Debug ) ]
Expand Down
2 changes: 1 addition & 1 deletion module/move/unitore/src/entity/config.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Functionality for storing and retrieving config files.
use error_tools::Result;
use error_tools::untyped::Result;
use gluesql::core::executor::Payload;

/// Config file path.
Expand Down
2 changes: 1 addition & 1 deletion module/move/unitore/src/entity/feed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use crate::*;
use std::time::Duration;
use error_tools::Result;
use error_tools::untyped::Result;
use gluesql::core::
{
ast_builder::{ null, text, timestamp, ExprNode },
Expand Down
2 changes: 1 addition & 1 deletion module/move/unitore/src/entity/frame.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Frame storing and retrieving functionality.
use crate::*;
use error_tools::Result;
use error_tools::untyped::Result;
use gluesql::core::
{
ast_builder::{ null, text, timestamp, ExprNode }, chrono::{ DateTime, SecondsFormat, Utc }, executor::Payload
Expand Down
2 changes: 1 addition & 1 deletion module/move/unitore/src/entity/table.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Functionality for storage tables information.
use crate::*;
use error_tools::Result;
use error_tools::untyped::Result;
use gluesql::prelude::Payload;

use action::table::TablesReport;
Expand Down
2 changes: 1 addition & 1 deletion module/move/unitore/src/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use crate::*;
use wca::{ Dictionary, Executor, Parser, Verifier };
use error_tools::Result;
use error_tools::untyped::Result;

/// Run feed updates.
pub fn execute() -> Result< (), Box< dyn std::error::Error + Send + Sync > >
Expand Down
2 changes: 1 addition & 1 deletion module/move/unitore/src/feed_config.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Reading and parsing of subscription configuration file.
use std::{ fs::OpenOptions, io::{ BufReader, Read } };
use error_tools::{ untyped::Context, Result };
use error_tools::{ untyped::Context, untyped::Result };
use serde::Deserialize;

/// Configuration for subscription to feed resource.
Expand Down
2 changes: 1 addition & 1 deletion module/move/unitore/src/retriever.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use hyper_util::
use http_body_util::{ Empty, BodyExt };
use hyper::body::Bytes;
use feed_rs::parser as feed_parser;
use error_tools::{ Result, untyped::Context };
use error_tools::{ untyped::Result, untyped::Context };

// qqq : purpose of trait if any?
// aaa : removed unnecessary trait
Expand Down
2 changes: 1 addition & 1 deletion module/move/unitore/src/sled_adapter/config.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Config file operation with Sled storage.
use crate::*;
use error_tools::{ err, Result };
use error_tools::{ err, untyped::Result };
use gluesql::
{
core::
Expand Down
4 changes: 2 additions & 2 deletions module/move/unitore/src/sled_adapter/feed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use crate::*;
use std::time::Duration;
use error_tools::{ Result, untyped::Context };
use error_tools::{ untyped::Result, untyped::Context };
use gluesql::
{
core::
Expand All @@ -25,7 +25,7 @@ use action::
frame::{ UpdateReport, SelectedEntries, FramesReport },
};
use sled_adapter::FeedStorage;
use wca::wtools::Itertools;
use wca::iter_tools::Itertools;

#[ async_trait::async_trait( ?Send ) ]
impl FeedStore for FeedStorage< SledStorage >
Expand Down
4 changes: 2 additions & 2 deletions module/move/unitore/src/sled_adapter/frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use crate::*;
use std::collections::HashMap;
use error_tools::{ Result, untyped::Context };
use error_tools::{ untyped::Result, untyped::Context };
use gluesql::
{
core::
Expand All @@ -16,7 +16,7 @@ use gluesql::
use entity::frame::{ FrameStore, Frame };
use action::frame::{ SelectedEntries, FramesReport, ListReport };
use sled_adapter::FeedStorage;
use wca::wtools::Itertools;
use wca::iter_tools::Itertools;

#[ async_trait::async_trait( ?Send ) ]
impl FrameStore for FeedStorage< SledStorage >
Expand Down
2 changes: 1 addition & 1 deletion module/move/unitore/src/sled_adapter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use crate::*;
use std::sync::Arc;
use error_tools::{ untyped::Context, Result };
use error_tools::{ untyped::Context, untyped::Result };
use tokio::sync::Mutex;
use gluesql::
{
Expand Down
2 changes: 1 addition & 1 deletion module/move/unitore/src/sled_adapter/table.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Table and columns info operations from Sled storage.
use crate::*;
use error_tools::Result;
use error_tools::untyped::Result;
use gluesql::
{
core::executor::Payload,
Expand Down
2 changes: 1 addition & 1 deletion module/move/unitore/tests/basic.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use feed_rs::parser as feed_parser;
use error_tools::Result;
use error_tools::untyped::Result;

#[ tokio::test ]
async fn frame() -> Result< () >
Expand Down
2 changes: 1 addition & 1 deletion module/move/unitore/tests/config_add.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use unitore::
entity::feed::FeedStore,
action::config,
};
use error_tools::Result;
use error_tools::untyped::Result;

#[ tokio::test ]
async fn config_add() -> Result< () >
Expand Down
2 changes: 1 addition & 1 deletion module/move/unitore/tests/config_delete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use unitore::
entity::config::ConfigStore,
action::config,
};
use error_tools::Result;
use error_tools::untyped::Result;

#[ tokio::test ]
async fn config_delete() -> Result< () >
Expand Down
4 changes: 2 additions & 2 deletions module/move/unitore/tests/frames_download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ use gluesql::
},
sled_storage::sled::Config,
};
use wca::wtools::Itertools;
use wca::iter_tools::Itertools;
use unitore::
{
feed_config::SubscriptionConfig,
sled_adapter::FeedStorage,
entity::{ frame::FrameStore, feed::FeedStore },
};
use error_tools::Result;
use error_tools::untyped::Result;

#[ tokio::test ]
async fn test_save() -> Result< () >
Expand Down
2 changes: 1 addition & 1 deletion module/move/unitore/tests/query_execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use gluesql::
sled_storage::sled,
};
use wca::{ VerifiedCommand, CommandsAggregator, Type, Parser, Dictionary, Verifier, Executor };
use error_tools::Result;
use error_tools::untyped::Result;
use mockall::predicate;
use std::path::PathBuf;

Expand Down
2 changes: 1 addition & 1 deletion module/move/unitore/tests/table_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use unitore::
sled_adapter::FeedStorage,
entity::table::TableStore,
};
use error_tools::Result;
use error_tools::untyped::Result;

#[ tokio::test ]
async fn table_list() -> Result< () >
Expand Down
2 changes: 1 addition & 1 deletion module/move/unitore/tests/tables_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use unitore::
sled_adapter::FeedStorage,
entity::table::TableStore,
};
use error_tools::Result;
use error_tools::untyped::Result;

#[ tokio::test ]
async fn tables_list() -> Result< () >
Expand Down

0 comments on commit 97954e6

Please sign in to comment.