Skip to content

Commit

Permalink
Remove test container file.
Browse files Browse the repository at this point in the history
  • Loading branch information
gudaoxuri committed Apr 10, 2024
1 parent 082ed44 commit 05cc8fb
Show file tree
Hide file tree
Showing 19 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion backend/basic/src/test.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#[cfg(feature = "default")]
pub mod init_rbum_test_container;
pub mod init_test_container;
#[cfg(feature = "default")]
pub mod test_http_client;
4 changes: 2 additions & 2 deletions backend/basic/tests/test_rbum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use bios_basic::rbum::serv::rbum_crud_serv::RbumCrudOperation;
use bios_basic::rbum::serv::rbum_domain_serv::RbumDomainServ;
use bios_basic::rbum::serv::rbum_item_serv::RbumItemServ;
use bios_basic::rbum::serv::rbum_kind_serv::RbumKindServ;
use bios_basic::test::init_rbum_test_container;
use bios_basic::test::init_test_container;
use tardis::basic::dto::TardisContext;
use tardis::basic::field::TrimString;
use tardis::basic::result::TardisResult;
Expand All @@ -35,7 +35,7 @@ mod test_scope;
async fn test_rbum() -> TardisResult<()> {
env::set_var("RUST_LOG", "debug,test_iam_serv=trace,sqlx::query=off");
let docker = testcontainers::clients::Cli::default();
let _x = init_rbum_test_container::init(&docker, None).await?;
let _x = init_test_container::init(&docker, None).await?;
let ctx = init_test_data().await?;
test_scope::test().await?;
test_rbum_domain::test(&ctx).await?;
Expand Down
4 changes: 2 additions & 2 deletions backend/middlewares/event/tests/test_event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::env;
use std::time::Duration;

use bios_basic::rbum::rbum_config::RbumConfig;
use bios_basic::test::init_rbum_test_container;
use bios_basic::test::init_test_container;
use bios_basic::test::test_http_client::TestHttpClient;
use bios_mw_event::event_constants::DOMAIN_CODE;
use bios_mw_event::event_initializer;
Expand All @@ -20,7 +20,7 @@ async fn test_event() -> TardisResult<()> {
env::set_var("RUST_LOG", "debug,tardis=trace,bios_mw_event=trace,test_event=trace,sqlx::query=off");

let docker = testcontainers::clients::Cli::default();
let _x = init_rbum_test_container::init(&docker, None).await?;
let _x = init_test_container::init(&docker, None).await?;
set_local_node_id(TardisFuns::field.nanoid());

init_data().await?;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::rc::Rc;
use std::time::Duration;

use bios_basic::rbum::rbum_config::RbumConfig;
use bios_basic::test::init_rbum_test_container;
use bios_basic::test::init_test_container;
use bios_basic::test::test_http_client::TestHttpClient;
use bios_mw_event::event_constants::DOMAIN_CODE;
use bios_mw_event::event_initializer;
Expand Down
4 changes: 2 additions & 2 deletions backend/middlewares/flow/tests/test_flow_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use bios_basic::rbum::rbum_config::RbumConfig;
use bios_basic::rbum::serv::rbum_kind_serv::RbumKindServ;
use bios_basic::spi::dto::spi_bs_dto::SpiBsAddReq;
use bios_basic::spi::spi_constants;
use bios_basic::test::init_rbum_test_container;
use bios_basic::test::init_test_container;
use bios_basic::test::test_http_client::TestHttpClient;
use bios_mw_flow::{flow_constants, flow_initializer};
use bios_spi_kv::{kv_constants, kv_initializer};
Expand All @@ -24,7 +24,7 @@ async fn test_flow_api() -> TardisResult<()> {
env::set_var("RUST_LOG", "debug,tardis=trace,bios_mw_event=trace,test_event=trace,sqlx::query=off");

let docker = testcontainers::clients::Cli::default();
let _x = init_rbum_test_container::init(&docker, None).await?;
let _x = init_test_container::init(&docker, None).await?;

let web_server = TardisFuns::web_server();
flow_initializer::init(&web_server).await.unwrap();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::{collections::VecDeque, env, sync::atomic::Ordering, time::Duration};

use bios_basic::test::init_rbum_test_container;
use bios_basic::test::init_test_container;
use bios_mw_schedule::{dto::schedule_job_dto::ScheduleJobAddOrModifyReq, schedule_config::ScheduleConfig, serv::schedule_job_serv::ScheduleTaskServ};

use tardis::{
Expand Down
4 changes: 2 additions & 2 deletions backend/middlewares/schedule/tests/test_multi.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
mod test_common;
use std::sync::atomic::Ordering;

use bios_basic::test::init_rbum_test_container;
use bios_basic::test::init_test_container;
use bios_mw_schedule::{dto::schedule_job_dto::ScheduleJobAddOrModifyReq, schedule_config::ScheduleConfig};
use tardis::chrono::{self, Utc};
use tardis::rand::seq::SliceRandom;
Expand All @@ -24,7 +24,7 @@ async fn test_multi() -> TardisResult<()> {
// std::env::set_current_dir("middlewares/schedule").unwrap();
std::env::set_var("RUST_LOG", "info,sqlx=off,sea_orm=INFO,bios_mw_schedule=TRACE,tardis=off");
let docker = testcontainers::clients::Cli::default();
let container_hold = init_rbum_test_container::init(&docker, None).await?;
let container_hold = init_test_container::init(&docker, None).await?;
let config = ScheduleConfig::default();

init_tardis().await?;
Expand Down
4 changes: 2 additions & 2 deletions backend/middlewares/schedule/tests/test_schedule.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::env;
use std::time::Duration;

use bios_basic::test::init_rbum_test_container;
use bios_basic::test::init_test_container;

use bios_mw_schedule::schedule_constants::DOMAIN_CODE;
use bios_mw_schedule::schedule_initializer;
Expand All @@ -21,7 +21,7 @@ async fn test_log() -> TardisResult<()> {
// for debug
// env::set_current_dir("middlewares/schedule").unwrap();
let docker = testcontainers::clients::Cli::default();
let container_hold = init_rbum_test_container::init(&docker, None).await?;
let container_hold = init_test_container::init(&docker, None).await?;
env::set_var("RUST_LOG", "debug,test_schedual=trace,sqlx::query=off,bios_mw_schedule=trace,bios_spi_kv=trace");

init_data().await?;
Expand Down
4 changes: 2 additions & 2 deletions backend/spi/spi-cache/tests/test_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::time::Duration;

use bios_basic::rbum::serv::rbum_kind_serv::RbumKindServ;
use bios_basic::spi::dto::spi_bs_dto::SpiBsAddReq;
use bios_basic::test::init_rbum_test_container;
use bios_basic::test::init_test_container;
use bios_basic::test::test_http_client::TestHttpClient;
use bios_spi_cache::cache_constants::{self, DOMAIN_CODE};
use bios_spi_cache::cache_initializer;
Expand All @@ -20,7 +20,7 @@ async fn test_cache() -> TardisResult<()> {
env::set_var("RUST_LOG", "debug,test_cache=trace,sqlx::query=off");

let docker = testcontainers::clients::Cli::default();
let _x = init_rbum_test_container::init(&docker, None).await?;
let _x = init_test_container::init(&docker, None).await?;

init_data().await?;

Expand Down
4 changes: 2 additions & 2 deletions backend/spi/spi-graph/tests/test_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::time::Duration;
use bios_basic::rbum::serv::rbum_kind_serv::RbumKindServ;
use bios_basic::spi::dto::spi_bs_dto::SpiBsAddReq;
use bios_basic::spi::spi_constants;
use bios_basic::test::init_rbum_test_container;
use bios_basic::test::init_test_container;
use bios_basic::test::test_http_client::TestHttpClient;
use bios_spi_graph::graph_constants::DOMAIN_CODE;
use bios_spi_graph::graph_initializer;
Expand All @@ -24,7 +24,7 @@ async fn test_graph() -> TardisResult<()> {
env::set_var("RUST_LOG", "debug,test_graph=trace,sqlx::query=off");

let docker = testcontainers::clients::Cli::default();
let _x = init_rbum_test_container::init(&docker, Some(format!("{}config", root_path))).await?;
let _x = init_test_container::init(&docker, Some(format!("{}config", root_path))).await?;

init_data().await?;

Expand Down
4 changes: 2 additions & 2 deletions backend/spi/spi-kv/tests/test_kv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::time::Duration;
use bios_basic::rbum::serv::rbum_kind_serv::RbumKindServ;
use bios_basic::spi::dto::spi_bs_dto::SpiBsAddReq;
use bios_basic::spi::spi_constants;
use bios_basic::test::init_rbum_test_container;
use bios_basic::test::init_test_container;
use bios_basic::test::test_http_client::TestHttpClient;
use bios_spi_kv::kv_constants::DOMAIN_CODE;
use bios_spi_kv::kv_initializer;
Expand All @@ -21,7 +21,7 @@ async fn test_kv() -> TardisResult<()> {
env::set_var("RUST_LOG", "debug,test_kv=trace,sqlx::query=off");

let docker = testcontainers::clients::Cli::default();
let _x = init_rbum_test_container::init(&docker, None).await?;
let _x = init_test_container::init(&docker, None).await?;

init_data().await?;

Expand Down
4 changes: 2 additions & 2 deletions backend/spi/spi-log/tests/test_log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::time::Duration;
use bios_basic::rbum::serv::rbum_kind_serv::RbumKindServ;
use bios_basic::spi::dto::spi_bs_dto::SpiBsAddReq;
use bios_basic::spi::spi_constants;
use bios_basic::test::init_rbum_test_container;
use bios_basic::test::init_test_container;
use bios_basic::test::test_http_client::TestHttpClient;
use bios_spi_log::log_constants::DOMAIN_CODE;
use bios_spi_log::log_initializer;
Expand All @@ -21,7 +21,7 @@ async fn test_log() -> TardisResult<()> {
env::set_var("RUST_LOG", "debug,test_log=trace,sqlx::query=off");

let docker = testcontainers::clients::Cli::default();
let _x = init_rbum_test_container::init(&docker, None).await?;
let _x = init_test_container::init(&docker, None).await?;

init_data().await?;

Expand Down
4 changes: 2 additions & 2 deletions backend/spi/spi-object/tests/test_object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::time::Duration;

use bios_basic::rbum::serv::rbum_kind_serv::RbumKindServ;
use bios_basic::spi::dto::spi_bs_dto::SpiBsAddReq;
use bios_basic::test::init_rbum_test_container;
use bios_basic::test::init_test_container;
use bios_basic::test::test_http_client::TestHttpClient;
use bios_spi_object::object_constants::{self, DOMAIN_CODE};
use bios_spi_object::object_initializer;
Expand All @@ -23,7 +23,7 @@ async fn test_object() -> TardisResult<()> {
let docker = testcontainers::clients::Cli::default();
let minio = TardisTestContainer::minio_custom(&docker);
let minio_url = format!("http://127.0.0.1:{}", minio.get_host_port_ipv4(9000));
let _x = init_rbum_test_container::init(&docker, None).await?;
let _x = init_test_container::init(&docker, None).await?;

init_data(&minio_url).await?;

Expand Down
4 changes: 2 additions & 2 deletions backend/spi/spi-plugin/tests/test_plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use bios_basic::rbum::serv::rbum_crud_serv::RbumCrudOperation;
use bios_basic::rbum::serv::rbum_kind_serv::{RbumKindAttrServ, RbumKindServ};
use bios_basic::spi::dto::spi_bs_dto::SpiBsAddReq;
use bios_basic::spi::spi_initializer;
use bios_basic::test::init_rbum_test_container;
use bios_basic::test::init_test_container;
use bios_basic::test::test_http_client::TestHttpClient;
use bios_spi_plugin::dto::plugin_api_dto::PluginApiAddOrModifyReq;
use bios_spi_plugin::dto::plugin_bs_dto::PluginBsAddReq;
Expand All @@ -27,7 +27,7 @@ async fn test_plugin() -> TardisResult<()> {
env::set_var("RUST_LOG", "debug,test_plugin=trace,sqlx::query=off");

let docker = testcontainers::clients::Cli::default();
let _x = init_rbum_test_container::init(&docker, None).await?;
let _x = init_test_container::init(&docker, None).await?;
init_data().await?;

Ok(())
Expand Down
4 changes: 2 additions & 2 deletions backend/spi/spi-reldb/tests/test_reldb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::time::Duration;
use bios_basic::rbum::serv::rbum_kind_serv::RbumKindServ;
use bios_basic::spi::dto::spi_bs_dto::SpiBsAddReq;
use bios_basic::spi::spi_constants;
use bios_basic::test::init_rbum_test_container;
use bios_basic::test::init_test_container;
use bios_basic::test::test_http_client::TestHttpClient;
use bios_spi_reldb::reldb_constants::DOMAIN_CODE;
use bios_spi_reldb::reldb_initializer;
Expand All @@ -21,7 +21,7 @@ async fn test_reldb() -> TardisResult<()> {
env::set_var("RUST_LOG", "debug,test_reldb=trace,sqlx::query=off");

let docker = testcontainers::clients::Cli::default();
let _x = init_rbum_test_container::init(&docker, None).await?;
let _x = init_test_container::init(&docker, None).await?;

init_data().await?;

Expand Down
4 changes: 2 additions & 2 deletions backend/spi/spi-stats/tests/test_stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::time::Duration;
use bios_basic::rbum::serv::rbum_kind_serv::RbumKindServ;
use bios_basic::spi::dto::spi_bs_dto::SpiBsAddReq;
use bios_basic::spi::spi_constants;
use bios_basic::test::init_rbum_test_container;
use bios_basic::test::init_test_container;
use bios_basic::test::test_http_client::TestHttpClient;
use bios_spi_stats::stats_constants::DOMAIN_CODE;
use bios_spi_stats::stats_initializer;
Expand All @@ -23,7 +23,7 @@ async fn test_stats() -> TardisResult<()> {
env::set_var("RUST_LOG", "debug,test_stats=trace,sqlx::query=off");

let docker = testcontainers::clients::Cli::default();
let _x = init_rbum_test_container::init(&docker, None).await?;
let _x = init_test_container::init(&docker, None).await?;

init_data().await?;

Expand Down
4 changes: 2 additions & 2 deletions backend/supports/iam/tests/test_iam_api.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::env;
use std::time::Duration;

use bios_basic::test::init_rbum_test_container;
use bios_basic::test::init_test_container;
use tardis::basic::result::TardisResult;
use tardis::tokio::time::sleep;
use tardis::{testcontainers, tokio, TardisFuns};
Expand All @@ -21,7 +21,7 @@ async fn test_iam_api() -> TardisResult<()> {
env::set_var("RUST_LOG", "debug,test_iam_api=trace,sqlx::query=off");

let docker = testcontainers::clients::Cli::default();
let _x = init_rbum_test_container::init(&docker, None).await?;
let _x = init_test_container::init(&docker, None).await?;
let _y = test_basic::init(&docker).await?;

let funs = iam_constants::get_tardis_inst();
Expand Down
4 changes: 2 additions & 2 deletions backend/supports/iam/tests/test_iam_serv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::env;
use std::time::Duration;

use bios_basic::rbum::rbum_initializer::get_first_account_context;
use bios_basic::test::init_rbum_test_container;
use bios_basic::test::init_test_container;
use bios_iam::iam_constants;
use tardis::basic::result::TardisResult;
use tardis::tokio::time::sleep;
Expand Down Expand Up @@ -33,7 +33,7 @@ async fn test_iam_serv() -> TardisResult<()> {
env::set_var("RUST_LOG", "debug,test_iam_serv=trace,sqlx::query=off");

let docker = testcontainers::clients::Cli::default();
let _x = init_rbum_test_container::init(&docker, None).await?;
let _x = init_test_container::init(&docker, None).await?;
let _y = test_basic::init(&docker).await?;

let funs = iam_constants::get_tardis_inst();
Expand Down

0 comments on commit 05cc8fb

Please sign in to comment.