Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rmn-boiko committed Oct 3, 2024
1 parent fea8286 commit 0f8ffce
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 58 deletions.
65 changes: 13 additions & 52 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/adapter/http/src/data/dataset_info_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

use axum::extract::{Extension, Path};
use axum::response::Json;
use database_common_macros::transactional_handler;
use dill::Catalog;
use http_common::*;
use kamu_core::{DatasetRepository, GetDatasetError};
Expand All @@ -35,6 +36,7 @@ pub struct Response {

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

#[transactional_handler]
pub async fn dataset_info_handler(
Extension(catalog): Extension<Catalog>,
Path(dataset_id): Path<DatasetID>,
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/http/tests/harness/server_side_s3_harness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ impl ServerSideS3Harness {
.add_builder(
DatasetRepositoryS3::builder()
.with_s3_context(s3_context.clone())
.with_multi_tenant(false),
.with_multi_tenant(options.multi_tenant),
)
.bind::<dyn DatasetRepository, DatasetRepositoryS3>()
.bind::<dyn DatasetRepositoryWriter, DatasetRepositoryS3>()
Expand Down
4 changes: 2 additions & 2 deletions src/adapter/http/tests/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ macro_rules! test_client_server_s3_harness_permutations {
paste::paste! {
#[test_group::group(containerized)]
#[test_log::test(tokio::test)]
async fn [<$test_name "_st_client_st_local_fs_server">] () {
async fn [<$test_name "_st_client_st_s3_server">] () {
$test_package::$test_name(
ClientSideHarness::new(ClientSideHarnessOptions { multi_tenant: false, authenticated_remotely: true }),
ServerSideS3Harness::new(ServerSideHarnessOptions {
Expand All @@ -118,7 +118,7 @@ macro_rules! test_client_server_s3_harness_permutations {
paste::paste! {
#[test_group::group(containerized)]
#[test_log::test(tokio::test)]
async fn [<$test_name "_st_client_mt_local_fs_server">] () {
async fn [<$test_name "_st_client_mt_s3_server">] () {
$test_package::$test_name(
ClientSideHarness::new(ClientSideHarnessOptions { multi_tenant: false, authenticated_remotely: true }),
ServerSideS3Harness::new(ServerSideHarnessOptions {
Expand Down
1 change: 1 addition & 0 deletions src/adapter/http/tests/tests/test_data_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ use serde_json::json;
use crate::harness::*;

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

struct Harness {
#[allow(dead_code)]
run_info_dir: tempfile::TempDir,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ pub(crate) async fn test_smart_push_via_repo_ref<TServerHarness: ServerSideHarne
.client_harness
.push_dataset_result(
scenario.client_dataset_ref,
scenario.server_dataset_ref.into(),
scenario.server_dataset_ref,
false,
DatasetVisibility::Private,
)
Expand Down
1 change: 0 additions & 1 deletion src/infra/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ filetime = "0.2"
indoc = "2"
mockall = { version = "0.13", default-features = false }
nanoid = "0.4.0"
mockito = "1.5.0"
test-group = { version = "1" }
test-log = { version = "0.2", features = ["trace"] }
tokio = { version = "1", default-features = false, features = ["rt", "macros"] }
Expand Down
1 change: 0 additions & 1 deletion src/utils/database-common/src/plugins/sqlite_plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ impl SqlitePlugin {
}

pub fn init_database_components(catalog_builder: &mut CatalogBuilder) {
println!("qwe");
catalog_builder.add::<Self>();
catalog_builder.add::<SqliteTransactionManager>();
}
Expand Down

0 comments on commit 0f8ffce

Please sign in to comment.