Skip to content

Commit

Permalink
tests: Add initial bridge backend test.
Browse files Browse the repository at this point in the history
  • Loading branch information
ceyhunsen committed Oct 7, 2024
1 parent 5dde565 commit 79d0f3a
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions tests/bridge_backend.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
use anyhow::bail;
use async_trait::async_trait;

use citrea_e2e::{
config::TestCaseConfig,
framework::TestFramework,
test_case::{TestCase, TestCaseRunner},
};

struct BasicBridgeBackendTest;

#[async_trait]
impl TestCase for BasicBridgeBackendTest {
fn test_config() -> TestCaseConfig {
TestCaseConfig {
with_bridge_backend: true,
with_sequencer: false,
..Default::default()
}
}

async fn run_test(&mut self, f: &mut TestFramework) -> citrea_e2e::Result<()> {
let Some(_da) = f.bitcoin_nodes.get(0) else {
bail!("bitcoind not running!")
};
let Some(_bridge_backend) = f.bridge_backend_nodes.get(0) else {
bail!("Bridge backend is not running!")
};

Ok(())
}
}

#[tokio::test]
async fn basic_prover_test() -> citrea_e2e::Result<()> {
TestCaseRunner::new(BasicBridgeBackendTest).run().await
}

0 comments on commit 79d0f3a

Please sign in to comment.