Skip to content

Commit 2d3d99e

Browse files
committed
refactor: simplify e2e node tests
1 parent 5ccf13c commit 2d3d99e

File tree

42 files changed

+110
-130
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+110
-130
lines changed

integration-tests/all-abi/events/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ pub mod events {
447447
type E2EResult<T> = std::result::Result<T, Box<dyn std::error::Error>>;
448448

449449
#[ink_e2e::test]
450-
async fn emits_foreign_event<Client: E2EBackend>(
450+
async fn emits_foreign_event(
451451
mut client: Client,
452452
) -> E2EResult<()> {
453453
// given
@@ -510,7 +510,7 @@ pub mod events {
510510
}
511511

512512
#[ink_e2e::test()]
513-
async fn emits_inline_anonymous_event<Client: E2EBackend>(
513+
async fn emits_inline_anonymous_event(
514514
mut client: Client,
515515
) -> E2EResult<()> {
516516
// given
@@ -597,7 +597,7 @@ pub mod events {
597597
}
598598

599599
#[ink_e2e::test]
600-
async fn emits_event_with_option_topic_some<Client: E2EBackend>(
600+
async fn emits_event_with_option_topic_some(
601601
mut client: Client,
602602
) -> E2EResult<()> {
603603
// given
@@ -672,7 +672,7 @@ pub mod events {
672672
}
673673

674674
#[ink_e2e::test]
675-
async fn emits_event_with_option_topic_none<Client: E2EBackend>(
675+
async fn emits_event_with_option_topic_none(
676676
mut client: Client,
677677
) -> E2EResult<()> {
678678
// given

integration-tests/internal/builtin-precompiles/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ mod builtin_precompiles {
4242
type E2EResult<T> = std::result::Result<T, Box<dyn std::error::Error>>;
4343

4444
#[ink_e2e::test]
45-
async fn bn128_add_works<Client: E2EBackend>(
45+
async fn bn128_add_works(
4646
mut client: Client,
4747
) -> E2EResult<()> {
4848
// given
@@ -76,7 +76,7 @@ mod builtin_precompiles {
7676
}
7777

7878
#[ink_e2e::test]
79-
async fn bn128_mul_works<Client: E2EBackend>(
79+
async fn bn128_mul_works(
8080
mut client: Client,
8181
) -> E2EResult<()> {
8282
// given
@@ -110,7 +110,7 @@ mod builtin_precompiles {
110110
}
111111

112112
#[ink_e2e::test]
113-
async fn bn128_pairing_works<Client: E2EBackend>(
113+
async fn bn128_pairing_works(
114114
mut client: Client,
115115
) -> E2EResult<()> {
116116
// given
@@ -143,7 +143,7 @@ mod builtin_precompiles {
143143
}
144144

145145
#[ink_e2e::test]
146-
async fn bn128_pairing_zero_points_works<Client: E2EBackend>(
146+
async fn bn128_pairing_zero_points_works(
147147
mut client: Client,
148148
) -> E2EResult<()> {
149149
// given

integration-tests/internal/call-builder-return-value/lib.rs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,7 @@ mod call_builder {
121121
type E2EResult<T> = std::result::Result<T, Box<dyn std::error::Error>>;
122122

123123
#[ink_e2e::test]
124-
async fn e2e_delegate_call_return_value_returns_correct_value<
125-
Client: E2EBackend,
126-
>(
124+
async fn e2e_delegate_call_return_value_returns_correct_value(
127125
mut client: Client,
128126
) -> E2EResult<()> {
129127
let origin = client
@@ -165,9 +163,7 @@ mod call_builder {
165163
}
166164

167165
#[ink_e2e::test]
168-
async fn e2e_delegate_call_return_value_errors_if_return_data_too_long<
169-
Client: E2EBackend,
170-
>(
166+
async fn e2e_delegate_call_return_value_errors_if_return_data_too_long(
171167
mut client: Client,
172168
) -> E2EResult<()> {
173169
let origin = client
@@ -209,9 +205,7 @@ mod call_builder {
209205
}
210206

211207
#[ink_e2e::test]
212-
async fn e2e_forward_call_return_value_returns_correct_value<
213-
Client: E2EBackend,
214-
>(
208+
async fn e2e_forward_call_return_value_returns_correct_value(
215209
mut client: Client,
216210
) -> E2EResult<()> {
217211
let origin = client
@@ -252,9 +246,7 @@ mod call_builder {
252246
}
253247

254248
#[ink_e2e::test]
255-
async fn e2e_forward_call_return_value_errors_if_return_data_too_long<
256-
Client: E2EBackend,
257-
>(
249+
async fn e2e_forward_call_return_value_errors_if_return_data_too_long(
258250
mut client: Client,
259251
) -> E2EResult<()> {
260252
let origin = client

integration-tests/internal/data-hostfns/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ mod data_hostfns {
3333
type E2EResult<T> = std::result::Result<T, Box<dyn std::error::Error>>;
3434

3535
#[ink_e2e::test]
36-
async fn e2e_call_data_size_works<Client: E2EBackend>(
36+
async fn e2e_call_data_size_works(
3737
mut client: Client,
3838
) -> E2EResult<()> {
3939
// given
@@ -63,7 +63,7 @@ mod data_hostfns {
6363
}
6464

6565
#[ink_e2e::test]
66-
async fn e2e_return_data_size_works<Client: E2EBackend>(
66+
async fn e2e_return_data_size_works(
6767
mut client: Client,
6868
) -> E2EResult<()> {
6969
// given

integration-tests/internal/gas-hostfns/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ mod gas_hostfns {
3939
type E2EResult<T> = std::result::Result<T, Box<dyn std::error::Error>>;
4040

4141
#[ink_e2e::test]
42-
async fn e2e_gas_limit_works<Client: E2EBackend>(
42+
async fn e2e_gas_limit_works(
4343
mut client: Client,
4444
) -> E2EResult<()> {
4545
// given
@@ -65,7 +65,7 @@ mod gas_hostfns {
6565
}
6666

6767
#[ink_e2e::test]
68-
async fn e2e_gas_price_works<Client: E2EBackend>(
68+
async fn e2e_gas_price_works(
6969
mut client: Client,
7070
) -> E2EResult<()> {
7171
// given
@@ -91,7 +91,7 @@ mod gas_hostfns {
9191
}
9292

9393
#[ink_e2e::test]
94-
async fn e2e_gas_left_works<Client: E2EBackend>(
94+
async fn e2e_gas_left_works(
9595
mut client: Client,
9696
) -> E2EResult<()> {
9797
// given

integration-tests/internal/lang-err/call-builder-delegate/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ mod call_builder {
102102
type E2EResult<T> = std::result::Result<T, Box<dyn std::error::Error>>;
103103

104104
#[ink_e2e::test]
105-
async fn e2e_invalid_message_selector_can_be_handled<Client: E2EBackend>(
105+
async fn e2e_invalid_message_selector_can_be_handled(
106106
mut client: Client,
107107
) -> E2EResult<()> {
108108
let origin = client
@@ -142,7 +142,7 @@ mod call_builder {
142142
}
143143

144144
#[ink_e2e::test]
145-
async fn e2e_invalid_message_selector_panics_on_invoke<Client: E2EBackend>(
145+
async fn e2e_invalid_message_selector_panics_on_invoke(
146146
mut client: Client,
147147
) -> E2EResult<()> {
148148
let origin = client

integration-tests/internal/lang-err/call-builder/lib.rs

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ mod call_builder {
176176
type E2EResult<T> = std::result::Result<T, Box<dyn std::error::Error>>;
177177

178178
#[ink_e2e::test]
179-
async fn e2e_invalid_message_selector_can_be_handled<Client: E2EBackend>(
179+
async fn e2e_invalid_message_selector_can_be_handled(
180180
mut client: Client,
181181
) -> E2EResult<()> {
182182
let origin = client
@@ -227,7 +227,7 @@ mod call_builder {
227227
}
228228

229229
#[ink_e2e::test]
230-
async fn e2e_invalid_message_selector_panics_on_invoke<Client: E2EBackend>(
230+
async fn e2e_invalid_message_selector_panics_on_invoke(
231231
mut client: Client,
232232
) -> E2EResult<()> {
233233
let mut constructor = CallBuilderTestRef::new();
@@ -264,7 +264,7 @@ mod call_builder {
264264
}
265265

266266
#[ink_e2e::test]
267-
async fn e2e_create_builder_works_with_valid_selector<Client: E2EBackend>(
267+
async fn e2e_create_builder_works_with_valid_selector(
268268
mut client: Client,
269269
) -> E2EResult<()> {
270270
let origin = client
@@ -305,7 +305,7 @@ mod call_builder {
305305
}
306306

307307
#[ink_e2e::test]
308-
async fn e2e_create_builder_fails_with_invalid_selector<Client: E2EBackend>(
308+
async fn e2e_create_builder_fails_with_invalid_selector(
309309
mut client: Client,
310310
) -> E2EResult<()> {
311311
let origin = client
@@ -346,9 +346,7 @@ mod call_builder {
346346
}
347347

348348
#[ink_e2e::test]
349-
async fn e2e_create_builder_with_infallible_revert_constructor_encodes_ok<
350-
Client: E2EBackend,
351-
>(
349+
async fn e2e_create_builder_with_infallible_revert_constructor_encodes_ok(
352350
mut client: Client,
353351
) -> E2EResult<()> {
354352
let origin = client
@@ -385,9 +383,7 @@ mod call_builder {
385383
}
386384

387385
#[ink_e2e::test]
388-
async fn e2e_create_builder_can_handle_fallible_constructor_success<
389-
Client: E2EBackend,
390-
>(
386+
async fn e2e_create_builder_can_handle_fallible_constructor_success(
391387
mut client: Client,
392388
) -> E2EResult<()> {
393389
let origin = client
@@ -429,9 +425,7 @@ mod call_builder {
429425
}
430426

431427
#[ink_e2e::test]
432-
async fn e2e_create_builder_can_handle_fallible_constructor_error<
433-
Client: E2EBackend,
434-
>(
428+
async fn e2e_create_builder_can_handle_fallible_constructor_error(
435429
mut client: Client,
436430
) -> E2EResult<()> {
437431
let origin = client
@@ -480,9 +474,7 @@ mod call_builder {
480474
}
481475

482476
#[ink_e2e::test]
483-
async fn e2e_create_builder_with_fallible_revert_constructor_encodes_ok<
484-
Client: E2EBackend,
485-
>(
477+
async fn e2e_create_builder_with_fallible_revert_constructor_encodes_ok(
486478
mut client: Client,
487479
) -> E2EResult<()> {
488480
let origin = client
@@ -519,9 +511,7 @@ mod call_builder {
519511
}
520512

521513
#[ink_e2e::test]
522-
async fn e2e_create_builder_with_fallible_revert_constructor_encodes_err<
523-
Client: E2EBackend,
524-
>(
514+
async fn e2e_create_builder_with_fallible_revert_constructor_encodes_err(
525515
mut client: Client,
526516
) -> E2EResult<()> {
527517
let origin = client

integration-tests/internal/lang-err/constructors-return-value/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ pub mod constructors_return_value {
116116
type E2EResult<T> = std::result::Result<T, Box<dyn std::error::Error>>;
117117

118118
#[ink_e2e::test]
119-
async fn e2e_infallible_constructor<Client: E2EBackend>(
119+
async fn e2e_infallible_constructor(
120120
mut client: Client,
121121
) -> E2EResult<()> {
122122
let mut constructor = ConstructorsReturnValueRef::new(true);
@@ -154,7 +154,7 @@ pub mod constructors_return_value {
154154
}
155155

156156
#[ink_e2e::test]
157-
async fn e2e_fallible_constructor_succeed<Client: E2EBackend>(
157+
async fn e2e_fallible_constructor_succeed(
158158
mut client: Client,
159159
) -> E2EResult<()> {
160160
let mut constructor = ConstructorsReturnValueRef::try_new(true);
@@ -205,7 +205,7 @@ pub mod constructors_return_value {
205205
}
206206

207207
#[ink_e2e::test]
208-
async fn e2e_fallible_constructor_fails<Client: E2EBackend>(
208+
async fn e2e_fallible_constructor_fails(
209209
mut client: Client,
210210
) -> E2EResult<()> {
211211
let mut constructor = ConstructorsReturnValueRef::try_new(false);

integration-tests/internal/lang-err/contract-ref/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ mod contract_ref {
8282
type E2EResult<T> = std::result::Result<T, Box<dyn std::error::Error>>;
8383

8484
#[ink_e2e::test]
85-
async fn e2e_ref_can_flip_correctly<Client: E2EBackend>(
85+
async fn e2e_ref_can_flip_correctly(
8686
mut client: Client,
8787
) -> E2EResult<()> {
8888
let flipper_hash = client
@@ -126,7 +126,7 @@ mod contract_ref {
126126
}
127127

128128
#[ink_e2e::test]
129-
async fn e2e_fallible_ref_can_be_instantiated<Client: E2EBackend>(
129+
async fn e2e_fallible_ref_can_be_instantiated(
130130
mut client: Client,
131131
) -> E2EResult<()> {
132132
let flipper_hash: ink::H256 = client
@@ -156,7 +156,7 @@ mod contract_ref {
156156
}
157157

158158
#[ink_e2e::test]
159-
async fn e2e_fallible_ref_fails_to_be_instantiated<Client: E2EBackend>(
159+
async fn e2e_fallible_ref_fails_to_be_instantiated(
160160
mut client: Client,
161161
) -> E2EResult<()> {
162162
let flipper_hash = client

integration-tests/internal/lang-err/integration-flipper/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ pub mod integration_flipper {
6767
type E2EResult<T> = std::result::Result<T, Box<dyn std::error::Error>>;
6868

6969
#[ink_e2e::test]
70-
async fn e2e_can_flip_correctly<Client: E2EBackend>(
70+
async fn e2e_can_flip_correctly(
7171
mut client: Client,
7272
) -> E2EResult<()> {
7373
let mut constructor = FlipperRef::new_default();
@@ -107,7 +107,7 @@ pub mod integration_flipper {
107107
}
108108

109109
#[ink_e2e::test]
110-
async fn e2e_message_error_reverts_state<Client: E2EBackend>(
110+
async fn e2e_message_error_reverts_state(
111111
mut client: Client,
112112
) -> E2EResult<()> {
113113
let mut constructor = FlipperRef::new_default();

0 commit comments

Comments
 (0)