-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathtest_output.txt
More file actions
161 lines (141 loc) · 8.45 KB
/
test_output.txt
File metadata and controls
161 lines (141 loc) · 8.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
cargo : Compiling
substream_contracts v0.0.0
(C:\Users\USER\SubStream-Pr
otocol-Contracts\contracts\
substream_contracts)
At line:1 char:1
+ cargo test
--manifest-path contracts/s
ubstream_contracts/Cargo.to
ml 2 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~
+ CategoryInfo
: NotSpecified: (
Compiling su...ream_co
ntracts):String) [], R
emoteException
+ FullyQualifiedErrorI
d : NativeCommandError
warning: use of deprecated
method `soroban_sdk::events
::Events::publish`: use
the #[contractevent] macro
on a contract event type
--> contracts\substream_
contracts\src\lib.rs:389:22
|
389 |
env.events().publish(
|
^^^^^^^
|
= note:
`#[warn(deprecated)]` on
by default
warning: use of deprecated
method `soroban_sdk::events
::Events::publish`: use
the #[contractevent] macro
on a contract event type
--> contracts\substream_
contracts\src\lib.rs:562:22
|
562 |
env.events().publish(
|
^^^^^^^
warning:
`substream_contracts` (lib
test) generated 2 warnings
Finished `test`
profile [unoptimized +
debuginfo] target(s) in
9.03s
Running unittests
src\lib.rs (target\debug\de
ps\substream_contracts-d7f1
e98d18dbae52.exe)
running 35 tests
test test::test_calculate_total_earned_caps_at_stream_balance ... ok
test test::test_calculate_total_earned_no_mutation_verify_via_balance ... ok
test test::test_calculate_total_earned_returns_zero_when_no_subscribers ... ok
test test::test_calculate_total_earned_group_channel_creator_share ... FAILED
test test::test_calculate_total_earned_paused_channel_returns_zero ... ok
test test::test_access_tiers_progression ... FAILED
test test::test_calculate_total_earned_single_stream_basic ... ok
test test::test_calculate_total_earned_reflects_already_collected_portion ... ok
test test::test_calculate_total_earned_zero_during_trial ... ok
test test::test_calculate_total_earned_mixed_single_and_group_streams ... FAILED
test test::test_cancel_exactly_at_minimum_duration ... ok
test test::test_calculate_total_earned_multiple_subscribers ... ok
test test::test_cliff_based_access_before_threshold ... ok
test test::test_creator_metadata ... ok
test test::test_cancel_after_minimum_duration ... ok
test test::test_group_requires_exactly_five_creators - should panic ... ok
test test::test_cancel_before_minimum_duration - should panic ... FAILED
test test::test_free_trial_ignores_claims_within_first_week ... ok
test test::test_cliff_threshold_access ... FAILED
test test::test_is_subscribed_none ... ok
test test::test_group_cancel_collects_and_refunds_remaining_balance ... ok
test test::test_group_percentages_must_sum_to_100 - should panic ... ok
test test::test_creator_coop_split_dynamic ... ok
test test::test_is_subscribed_expired ... ok
test test::test_is_subscribed_active ... ok
test test::test_group_subscribe_and_collect_split ... ok
test test::test_inactive_stream_moves_to_temporary_storage ... ok
test test::test_migrate_tier_collects_at_old_rate_before_switching ... ok
test test::test_migrate_tier_emits_event ... ok
test test::test_migrate_tier_with_top_up_is_atomic ... ok
test test::test_top_up ... ok
test test::test_pause_channel_blocks_charges_and_unpause_resumes ... ok
test test::test_pause_channel_applies_to_all_subscribers ... ok
test test::test_migrate_tier_new_rate_applies_after_switch ... ok
test test::test_top_up_reactivates_stream_to_persistent_storage ... ok
failures:
---- test::test_calculate_total_earned_group_channel_creator_share stdout ----
thread 'test::test_calculate_total_earned_group_channel_creator_share' (1412) panicked at contracts\substream_contracts\src\test.rs:1156:5:
assertion `left == right` failed
left: 0
right: 400
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Writing test snapshot file for test "test::test_calculate_total_earned_group_channel_creator_share" to "test_snapshots\\test\\test_calculate_total_earned_group_channel_creator_share.1.json".
---- test::test_access_tiers_progression stdout ----
thread 'test::test_access_tiers_progression' (12944) panicked at contracts\substream_contracts\src\test.rs:890:5:
assertion `left == right` failed
left: 2
right: 1
Writing test snapshot file for test "test::test_access_tiers_progression" to "test_snapshots\\test\\test_access_tiers_progression.1.json".
---- test::test_calculate_total_earned_mixed_single_and_group_streams stdout ----
thread 'test::test_calculate_total_earned_mixed_single_and_group_streams' (15236) panicked at contracts\substream_contracts\src\test.rs:1271:5:
assertion `left == right` failed
left: 600
right: 1600
Writing test snapshot file for test "test::test_calculate_total_earned_mixed_single_and_group_streams" to "test_snapshots\\test\\test_calculate_total_earned_mixed_single_and_group_streams.1.json".
---- test::test_cancel_before_minimum_duration stdout ----
thread 'test::test_cancel_before_minimum_duration' (14068) panicked at C:\Users\USER\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\soroban-env-host-25.0.1\src\host.rs:907:9:
HostError: Error(WasmVm, InvalidAction)
Event log (newest first):
0: [Diagnostic Event] topics:[error, Error(WasmVm, InvalidAction)], data:"escalating error to panic"
1: [Diagnostic Event] topics:[error, Error(WasmVm, InvalidAction)], data:["contract call failed", cancel, [CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM, CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4]]
2: [Failed Diagnostic Event (not emitted)] contract:CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAK3IM, topics:[error, Error(WasmVm, InvalidAction)], data:"caught error from function"
3: [Failed Diagnostic Event (not emitted)] contract:CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAK3IM, topics:[log], data:["caught panic 'cannot cancel: minimum duration not met. 82800 seconds remaining' from contract function 'Symbol(cancel)'", CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM, CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4]
4: [Diagnostic Event] topics:[fn_call, CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAK3IM, cancel], data:[CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM, CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4]
Writing test snapshot file for test "test::test_cancel_before_minimum_duration" to "test_snapshots\\test\\test_cancel_before_minimum_duration.1.json".
note: panic did not contain expected string
panic message: "HostError: Error(WasmVm, InvalidAction)\n\nEvent log (newest first):\n 0: [Diagnostic Event] topics:[error, Error(WasmVm, InvalidAction)], data:\"escalating error to panic\"\n 1: [Diagnostic Event] topics:[error, Error(WasmVm, InvalidAction)], data:[\"contract call failed\", cancel, [CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM, CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4]]\n 2: [Failed Diagnostic Event (not emitted)] contract:CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAK3IM, topics:[error, Error(WasmVm, InvalidAction)], data:\"caught error from function\"\n 3: [Failed Diagnostic Event (not emitted)] contract:CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAK3IM, topics:[log], data:[\"caught panic 'cannot cancel: minimum duration not met. 82800 seconds remaining' from contract function 'Symbol(cancel)'\", CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM, CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4]\n 4: [Diagnostic Event] topics:[fn_call, CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAK3IM, cancel], data:[CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM, CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4]\n"
expected substring: "cannot cancel stream: minimum duration not met"
---- test::test_cliff_threshold_access stdout ----
thread 'test::test_cliff_threshold_access' (10872) panicked at contracts\substream_contracts\src\test.rs:856:5:
assertion failed: !client.has_unlocked_access(&subscriber, &creator)
Writing test snapshot file for test "test::test_cliff_threshold_access" to "test_snapshots\\test\\test_cliff_threshold_access.1.json".
failures:
test::test_access_tiers_progression
test::test_calculate_total_earned_group_channel_creator_share
test::test_calculate_total_earned_mixed_single_and_group_streams
test::test_cancel_before_minimum_duration
test::test_cliff_threshold_access
test result: FAILED. 30 passed; 5 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.16s
error: test failed, to
rerun pass `--lib`