diff --git a/crates/core/app/tests/mock_consensus.rs b/crates/core/app/tests/mock_consensus.rs index 5a2c3490b2..1aa44899b9 100644 --- a/crates/core/app/tests/mock_consensus.rs +++ b/crates/core/app/tests/mock_consensus.rs @@ -3,6 +3,8 @@ // Note: these should eventually replace the existing test cases. mock consensus tests are placed // here while the engine is still in development. See #3588. +use tempfile::tempdir; + mod common; use { @@ -204,3 +206,30 @@ async fn mock_consensus_can_spend_notes_and_detect_outputs() -> anyhow::Result<( Ok(()) } + +#[tokio::test] +#[ignore = "this test is not currently expected to pass"] /*TODO(kate)*/ +async fn mock_consensus_view_server_test() -> anyhow::Result<()> { + use camino::Utf8PathBuf; + + // Install a test logger, acquire some temporary storage, and start the test node. + let guard = common::set_tracing_subscriber(); + let tempdir = tempdir()?; + let storage = TempStorage::new().await?; + let _test_node = common::start_test_node(&storage).await?; + + const VIEW_FILE_NAME: &str = "pcli-view.sqlite"; /*copied from pcli*/ + let url = "http:127.0.0.1:8080".parse::()?; + let sqlite_path = tempdir.path().join(VIEW_FILE_NAME); + let view_service = penumbra_view::ViewServer::load_or_initialize( + Some(Utf8PathBuf::from_path_buf(sqlite_path).unwrap()), + &*test_keys::FULL_VIEWING_KEY, + url, + ) + .await?; + + drop(view_service); + drop(tempdir); + drop(guard); + Ok(()) +}