Skip to content

Commit

Permalink
Re-enable tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ebatsell committed Jun 3, 2024
1 parent 64a1e7e commit c7ec160
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ jobs:
with:
name: validator_history.so
path: target/deploy/validator_history.so

- name: Upload jito_steward.so
uses: actions/upload-artifact@v4
with:
name: jito_steward.so
path: target/deploy/jito_steward.so
# - name: Upload IDL
# uses: actions/upload-artifact@v4
# with:
Expand All @@ -116,12 +122,18 @@ jobs:
name: validator_history.so
path: target/deploy/
- name: cargo test
run: cargo test --package tests --test mod validator_history --all-features --color auto
run: cargo test --package tests --all-features --color auto -- --skip steward::test_state_methods
shell: bash
env:
RUST_LOG: trace
SBF_OUT_DIR: ${{ github.workspace }}/target/deploy
RUST_MIN_STACK: 5000000
- name: cargo test steward::test_state_methods
run: cargo test --package tests --test mod steward::test_state_methods
shell: bash
env:
RUST_LOG: trace
RUST_MIN_STACK: 5000000

# release only runs on tagged commits
# it should wait for all the other steps to finish, to ensure releases are the highest quality
Expand Down
5 changes: 1 addition & 4 deletions programs/steward/src/score.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,7 @@ pub fn validator_score(

let historical_commission_max = validator
.history
.commission_range(
VALIDATOR_HISTORY_FIRST_RELIABLE_EPOCH as u16,
current_epoch as u16,
)
.commission_range(VALIDATOR_HISTORY_FIRST_RELIABLE_EPOCH as u16, current_epoch)
.iter()
.filter_map(|&i| i)
.max()
Expand Down
2 changes: 1 addition & 1 deletion programs/steward/src/state/steward_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use validator_history::{ClusterHistory, ValidatorHistory};

// Tests will fail here - comment out msg! to pass
fn invalid_state_error(expected: String, actual: String) -> Error {
// msg!("Invalid state. Expected {}, Actual {}", expected, actual);
msg!("Invalid state. Expected {}, Actual {}", expected, actual);
StewardError::InvalidState.into()
}

Expand Down

0 comments on commit c7ec160

Please sign in to comment.