@@ -23,9 +23,6 @@ use test_rpc::meta::Os;
23
23
/// * `priority` - The order in which tests will be run where low numbers run before high numbers
24
24
/// and tests with the same number run in undefined order. `priority` defaults to 0.
25
25
///
26
- /// * `cleanup` - If the cleanup function will run after the test is finished and among other things
27
- /// reset the settings to the default value for the daemon. `cleanup` defaults to true.
28
- ///
29
26
/// * `must_succeed` - If the testing suite stops running if this test fails. `must_succeed`
30
27
/// defaults to false.
31
28
///
@@ -54,11 +51,10 @@ use test_rpc::meta::Os;
54
51
///
55
52
/// ## Create a test with custom parameters
56
53
///
57
- /// This test will run early in the test loop, won't perform any cleanup, must
58
- /// succeed and will always run.
54
+ /// This test will run early in the test loop and must succeed and will always run.
59
55
///
60
56
/// ```ignore
61
- /// #[test_function(priority = -1337, cleanup = false, must_succeed = true, always_run = true)]
57
+ /// #[test_function(priority = -1337, must_succeed = true, always_run = true)]
62
58
/// pub async fn test_function(
63
59
/// rpc: ServiceClient,
64
60
/// mut mullvad_client: mullvad_management_interface::MullvadProxyClient,
@@ -112,7 +108,6 @@ fn parse_marked_test_function(
112
108
113
109
fn get_test_macro_parameters ( attributes : & syn:: AttributeArgs ) -> Result < MacroParameters > {
114
110
let mut priority = None ;
115
- let mut cleanup = true ;
116
111
let mut always_run = false ;
117
112
let mut must_succeed = false ;
118
113
let mut targets = vec ! [ ] ;
@@ -139,11 +134,6 @@ fn get_test_macro_parameters(attributes: &syn::AttributeArgs) -> Result<MacroPar
139
134
Lit :: Bool ( lit_bool) => must_succeed = lit_bool. value ( ) ,
140
135
_ => bail ! ( nv, "'must_succeed' should have a bool value" ) ,
141
136
}
142
- } else if nv. path . is_ident ( "cleanup" ) {
143
- match lit {
144
- Lit :: Bool ( lit_bool) => cleanup = lit_bool. value ( ) ,
145
- _ => bail ! ( nv, "'cleanup' should have a bool value" ) ,
146
- }
147
137
} else if nv. path . is_ident ( "target_os" ) {
148
138
let Lit :: Str ( lit_str) = lit else {
149
139
bail ! ( nv, "'target_os' should have a string value" ) ;
@@ -166,7 +156,6 @@ fn get_test_macro_parameters(attributes: &syn::AttributeArgs) -> Result<MacroPar
166
156
167
157
Ok ( MacroParameters {
168
158
priority,
169
- cleanup,
170
159
always_run,
171
160
must_succeed,
172
161
targets,
@@ -186,7 +175,6 @@ fn create_test(test_function: TestFunction) -> proc_macro2::TokenStream {
186
175
} )
187
176
. collect ( ) ;
188
177
189
- let should_cleanup = test_function. macro_parameters . cleanup ;
190
178
let always_run = test_function. macro_parameters . always_run ;
191
179
let must_succeed = test_function. macro_parameters . must_succeed ;
192
180
@@ -232,7 +220,6 @@ fn create_test(test_function: TestFunction) -> proc_macro2::TokenStream {
232
220
priority: #test_function_priority,
233
221
always_run: #always_run,
234
222
must_succeed: #must_succeed,
235
- cleanup: #should_cleanup,
236
223
} ) ;
237
224
}
238
225
}
@@ -245,7 +232,6 @@ struct TestFunction {
245
232
246
233
struct MacroParameters {
247
234
priority : Option < i32 > ,
248
- cleanup : bool ,
249
235
always_run : bool ,
250
236
must_succeed : bool ,
251
237
targets : Vec < Os > ,
0 commit comments