Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solana: add more tests #219

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions solana/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ COPY Cargo.lock Cargo.lock
COPY Cargo.toml Cargo.toml
COPY modules modules
COPY programs programs
COPY rust-toolchain rust-toolchain

ENV RUST_BACKTRACE=1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use wormhole_anchor_sdk::wormhole::PostedVaa;

use crate::common::query::GetAccountDataAnchor;
use crate::common::setup::{setup, OTHER_TRANSCEIVER};
use crate::sdk::accounts::{good_ntt, NTTAccounts};
use crate::sdk::transceivers::wormhole::instructions::broadcast_id::{broadcast_id, BroadcastId};
use crate::{
common::submit::Submittable,
Expand All @@ -24,12 +25,12 @@ pub mod sdk;

#[tokio::test]
async fn test_broadcast_peer() {
let (mut ctx, test_data) = setup(Mode::Locking).await;
let (mut ctx, _test_data) = setup(Mode::Locking).await;

let wh_message = Keypair::new();

broadcast_peer(
&test_data.ntt,
&good_ntt,
BroadcastPeer {
payer: ctx.payer.pubkey(),
wormhole_message: wh_message.pubkey(),
Expand Down Expand Up @@ -60,7 +61,7 @@ async fn test_broadcast_id() {
let wh_message = Keypair::new();

broadcast_id(
&test_data.ntt,
&good_ntt,
BroadcastId {
payer: ctx.payer.pubkey(),
wormhole_message: wh_message.pubkey(),
Expand All @@ -78,7 +79,7 @@ async fn test_broadcast_id() {
assert_eq!(
*msg.data(),
WormholeTransceiverInfo {
manager_address: test_data.ntt.program.to_bytes(),
manager_address: good_ntt.program().to_bytes(),
manager_mode: Mode::Locking,
token_address: test_data.mint.to_bytes(),
token_decimals: 9,
Expand Down
Loading
Loading