Skip to content

Commit 004da11

Browse files
committed
processor: set authority checked: tests
1 parent 64433b1 commit 004da11

File tree

3 files changed

+39
-6
lines changed

3 files changed

+39
-6
lines changed

program/tests/initialize_buffer.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ fn fail_buffer_already_initialized() {
3535
],
3636
&[
3737
Check::err(ProgramError::AccountAlreadyInitialized),
38-
Check::compute_units(1245),
38+
Check::compute_units(1244),
3939
],
4040
);
4141
}
@@ -62,7 +62,7 @@ fn fail_buffer_account_too_small() {
6262
],
6363
&[
6464
Check::err(ProgramError::InvalidAccountData),
65-
Check::compute_units(789),
65+
Check::compute_units(788),
6666
],
6767
);
6868
}
@@ -89,7 +89,7 @@ fn fail_buffer_account_not_owned_by_loader() {
8989
],
9090
&[
9191
Check::instruction_err(InstructionError::ExternalAccountDataModified),
92-
Check::compute_units(642),
92+
Check::compute_units(641),
9393
],
9494
);
9595
}
@@ -116,7 +116,7 @@ fn success() {
116116
],
117117
&[
118118
Check::success(),
119-
Check::compute_units(2169),
119+
Check::compute_units(2168),
120120
Check::account(&source)
121121
.lamports(100_000_000)
122122
.owner(&solana_loader_v3_program::id())
+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#![cfg(feature = "test-sbf")]
2+
3+
mod common;
4+
5+
#[test]
6+
fn fail_invalid_account_state() {}
7+
8+
#[test]
9+
fn buffer_fail_buffer_immutable() {}
10+
11+
#[test]
12+
fn buffer_fail_incorrect_authority() {}
13+
14+
#[test]
15+
fn buffer_fail_authority_not_signer() {}
16+
17+
#[test]
18+
fn buffer_fail_new_authority_not_signer() {}
19+
20+
#[test]
21+
fn programdata_fail_not_upgradeable() {}
22+
23+
#[test]
24+
fn programdata_fail_incorrect_authority() {}
25+
26+
#[test]
27+
fn programdata_fail_authority_not_signer() {}
28+
29+
#[test]
30+
fn programdata_fail_new_authority_not_signer() {}
31+
32+
#[test]
33+
fn success() {}

program/tests/write.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ fn success() {
6060
],
6161
&[
6262
Check::success(),
63-
Check::compute_units(1418),
63+
Check::compute_units(1419),
6464
Check::account(&buffer).data(&check_data).build(),
6565
],
6666
);
@@ -79,7 +79,7 @@ fn success() {
7979
],
8080
&[
8181
Check::success(),
82-
Check::compute_units(1390),
82+
Check::compute_units(1391),
8383
Check::account(&buffer).data(&check_data).build(),
8484
],
8585
);

0 commit comments

Comments
 (0)