diff --git a/test/test-manager/src/tests/test_metadata.rs b/test/test-manager/src/tests/test_metadata.rs index 474ad0a566fb..c403795a2b32 100644 --- a/test/test-manager/src/tests/test_metadata.rs +++ b/test/test-manager/src/tests/test_metadata.rs @@ -10,7 +10,6 @@ pub struct TestMetadata { pub priority: Option, pub always_run: bool, pub must_succeed: bool, - pub cleanup: bool, } impl TestMetadata { diff --git a/test/test-manager/test_macro/src/lib.rs b/test/test-manager/test_macro/src/lib.rs index 0249f9db6cdb..fc9a077ddb90 100644 --- a/test/test-manager/test_macro/src/lib.rs +++ b/test/test-manager/test_macro/src/lib.rs @@ -23,9 +23,6 @@ use test_rpc::meta::Os; /// * `priority` - The order in which tests will be run where low numbers run before high numbers /// and tests with the same number run in undefined order. `priority` defaults to 0. /// -/// * `cleanup` - If the cleanup function will run after the test is finished and among other things -/// reset the settings to the default value for the daemon. `cleanup` defaults to true. -/// /// * `must_succeed` - If the testing suite stops running if this test fails. `must_succeed` /// defaults to false. /// @@ -54,11 +51,10 @@ use test_rpc::meta::Os; /// /// ## Create a test with custom parameters /// -/// This test will run early in the test loop, won't perform any cleanup, must -/// succeed and will always run. +/// This test will run early in the test loop and must succeed and will always run. /// /// ```ignore -/// #[test_function(priority = -1337, cleanup = false, must_succeed = true, always_run = true)] +/// #[test_function(priority = -1337, must_succeed = true, always_run = true)] /// pub async fn test_function( /// rpc: ServiceClient, /// mut mullvad_client: mullvad_management_interface::MullvadProxyClient, @@ -112,7 +108,6 @@ fn parse_marked_test_function( fn get_test_macro_parameters(attributes: &syn::AttributeArgs) -> Result { let mut priority = None; - let mut cleanup = true; let mut always_run = false; let mut must_succeed = false; let mut targets = vec![]; @@ -139,11 +134,6 @@ fn get_test_macro_parameters(attributes: &syn::AttributeArgs) -> Result must_succeed = lit_bool.value(), _ => bail!(nv, "'must_succeed' should have a bool value"), } - } else if nv.path.is_ident("cleanup") { - match lit { - Lit::Bool(lit_bool) => cleanup = lit_bool.value(), - _ => bail!(nv, "'cleanup' should have a bool value"), - } } else if nv.path.is_ident("target_os") { let Lit::Str(lit_str) = lit else { bail!(nv, "'target_os' should have a string value"); @@ -166,7 +156,6 @@ fn get_test_macro_parameters(attributes: &syn::AttributeArgs) -> Result proc_macro2::TokenStream { }) .collect(); - let should_cleanup = test_function.macro_parameters.cleanup; let always_run = test_function.macro_parameters.always_run; let must_succeed = test_function.macro_parameters.must_succeed; @@ -232,7 +220,6 @@ fn create_test(test_function: TestFunction) -> proc_macro2::TokenStream { priority: #test_function_priority, always_run: #always_run, must_succeed: #must_succeed, - cleanup: #should_cleanup, }); } } @@ -245,7 +232,6 @@ struct TestFunction { struct MacroParameters { priority: Option, - cleanup: bool, always_run: bool, must_succeed: bool, targets: Vec,