Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Use Cargo's directory layout for CLI tests

Manav Rathi42aace12075f
diff --git a/rust/apps/cli-next/tests/support/account.rs b/rust/apps/cli-next/tests/cli/account.rs
similarity index 98%
rename from rust/apps/cli-next/tests/support/account.rs
rename to rust/apps/cli-next/tests/cli/account.rs
index 30a3cd8a65..47aebe3440 100644
--- a/rust/apps/cli-next/tests/support/account.rs
+++ b/rust/apps/cli-next/tests/cli/account.rs
@@ -397,10 +397,7 @@ fn interactive_creation_password_retry_and_enrollment() -> ente_test_support::Te
success(
Command::new("python3")
.args([
- concat!(
- env!("CARGO_MANIFEST_DIR"),
- "/tests/support/account_prompt.py"
- ),
+ concat!(env!("CARGO_MANIFEST_DIR"), "/tests/cli/account_prompt.py"),
env!("CARGO_BIN_EXE_ente-cli-next"),
&origin,
&email,
diff --git a/rust/apps/cli-next/tests/support/account_prompt.py b/rust/apps/cli-next/tests/cli/account_prompt.py
similarity index 100%
rename from rust/apps/cli-next/tests/support/account_prompt.py
rename to rust/apps/cli-next/tests/cli/account_prompt.py
diff --git a/rust/apps/cli-next/tests/support/admin.rs b/rust/apps/cli-next/tests/cli/admin.rs
similarity index 100%
rename from rust/apps/cli-next/tests/support/admin.rs
rename to rust/apps/cli-next/tests/cli/admin.rs
diff --git a/rust/apps/cli-next/tests/support/admin_museum.rs b/rust/apps/cli-next/tests/cli/admin_museum.rs
similarity index 99%
rename from rust/apps/cli-next/tests/support/admin_museum.rs
rename to rust/apps/cli-next/tests/cli/admin_museum.rs
index 1294f35577..9641a4b271 100644
--- a/rust/apps/cli-next/tests/support/admin_museum.rs
+++ b/rust/apps/cli-next/tests/cli/admin_museum.rs
@@ -280,7 +280,7 @@ fn admin_interactive_subscription() -> TestResult {
let output = Command::new("python3")
.env_clear()
.args([
- concat!(env!("CARGO_MANIFEST_DIR"), "/tests/support/admin_prompt.py"),
+ concat!(env!("CARGO_MANIFEST_DIR"), "/tests/cli/admin_prompt.py"),
env!("CARGO_BIN_EXE_ente-cli-next"),
&email,
mode,
diff --git a/rust/apps/cli-next/tests/support/admin_prompt.py b/rust/apps/cli-next/tests/cli/admin_prompt.py
similarity index 100%
rename from rust/apps/cli-next/tests/support/admin_prompt.py
rename to rust/apps/cli-next/tests/cli/admin_prompt.py
diff --git a/rust/apps/cli-next/tests/support/auth.rs b/rust/apps/cli-next/tests/cli/auth.rs
similarity index 100%
rename from rust/apps/cli-next/tests/support/auth.rs
rename to rust/apps/cli-next/tests/cli/auth.rs
diff --git a/rust/apps/cli-next/tests/support/export.rs b/rust/apps/cli-next/tests/cli/export.rs
similarity index 100%
rename from rust/apps/cli-next/tests/support/export.rs
rename to rust/apps/cli-next/tests/cli/export.rs
diff --git a/rust/apps/cli-next/tests/support/export_adoption.rs b/rust/apps/cli-next/tests/cli/export_adoption.rs
similarity index 100%
rename from rust/apps/cli-next/tests/support/export_adoption.rs
rename to rust/apps/cli-next/tests/cli/export_adoption.rs
diff --git a/rust/apps/cli-next/tests/support/export_engine.rs b/rust/apps/cli-next/tests/cli/export_engine.rs
similarity index 100%
rename from rust/apps/cli-next/tests/support/export_engine.rs
rename to rust/apps/cli-next/tests/cli/export_engine.rs
diff --git a/rust/apps/cli-next/tests/support/export_maintenance.rs b/rust/apps/cli-next/tests/cli/export_maintenance.rs
similarity index 100%
rename from rust/apps/cli-next/tests/support/export_maintenance.rs
rename to rust/apps/cli-next/tests/cli/export_maintenance.rs
diff --git a/rust/apps/cli-next/tests/support/export_media.rs b/rust/apps/cli-next/tests/cli/export_media.rs
similarity index 100%
rename from rust/apps/cli-next/tests/support/export_media.rs
rename to rust/apps/cli-next/tests/cli/export_media.rs
diff --git a/rust/apps/cli-next/tests/support/export_process.rs b/rust/apps/cli-next/tests/cli/export_process.rs
similarity index 100%
rename from rust/apps/cli-next/tests/support/export_process.rs
rename to rust/apps/cli-next/tests/cli/export_process.rs
diff --git a/rust/apps/cli-next/tests/support/export_resources.rs b/rust/apps/cli-next/tests/cli/export_resources.rs
similarity index 100%
rename from rust/apps/cli-next/tests/support/export_resources.rs
rename to rust/apps/cli-next/tests/cli/export_resources.rs
diff --git a/rust/apps/cli-next/tests/support/export_sources.rs b/rust/apps/cli-next/tests/cli/export_sources.rs
similarity index 100%
rename from rust/apps/cli-next/tests/support/export_sources.rs
rename to rust/apps/cli-next/tests/cli/export_sources.rs
diff --git a/rust/apps/cli-next/tests/support/files.rs b/rust/apps/cli-next/tests/cli/files.rs
similarity index 100%
rename from rust/apps/cli-next/tests/support/files.rs
rename to rust/apps/cli-next/tests/cli/files.rs
diff --git a/rust/apps/cli-next/tests/cli.rs b/rust/apps/cli-next/tests/cli/main.rs
similarity index 99%
rename from rust/apps/cli-next/tests/cli.rs
rename to rust/apps/cli-next/tests/cli/main.rs
index 9b3f125ac5..31572f3a9e 100644
--- a/rust/apps/cli-next/tests/cli.rs
+++ b/rust/apps/cli-next/tests/cli/main.rs
@@ -1019,31 +1019,22 @@ fn failure(output: &Output) -> String {
String::from_utf8_lossy(&output.stderr).into_owned()
}
-#[path = "support/account.rs"]
mod account;
-#[path = "support/admin.rs"]
mod admin;
#[cfg(feature = "museum")]
-#[path = "support/admin_museum.rs"]
mod admin_museum;
-#[path = "support/auth.rs"]
mod auth;
-#[path = "support/export_process.rs"]
mod export_process;
-#[path = "support/export_sources.rs"]
mod export_sources;
-#[path = "support/files.rs"]
mod files;
#[cfg(feature = "museum")]
-#[path = "cli/museum.rs"]
mod museum;
-#[path = "support/paste.rs"]
mod paste;
diff --git a/rust/apps/cli-next/tests/cli/museum.rs b/rust/apps/cli-next/tests/cli/museum.rs
index df369d0269..dab8004289 100644
--- a/rust/apps/cli-next/tests/cli/museum.rs
+++ b/rust/apps/cli-next/tests/cli/museum.rs
@@ -963,5 +963,5 @@ async fn set_album_metadata(
.unwrap();
}
-#[path = "../support/export.rs"]
+#[path = "export.rs"]
mod export;
diff --git a/rust/apps/cli-next/tests/support/paste.rs b/rust/apps/cli-next/tests/cli/paste.rs
similarity index 100%
rename from rust/apps/cli-next/tests/support/paste.rs
rename to rust/apps/cli-next/tests/cli/paste.rs