v0.3.12-pre.002
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-worker-raw-transaction-ingest-lib/tests/public_api.rs
|
||||
// version: 8
|
||||
// version: 9
|
||||
|
||||
//! External public-surface proofs for the RAW transaction ingest Worker foundation.
|
||||
|
||||
@@ -135,3 +135,37 @@ fn pre_009_source_and_drain_timeout_error_codes_are_public_and_stable() {
|
||||
assert_eq!(ksp_worker_raw_transaction_ingest_lib::ERROR_CODE_RAW_TRANSACTION_INGEST_SOURCE_FAILED.code(), "source_failed");
|
||||
return;
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn v0_3_12_pre_002_runtime_resource_types_are_consumable_without_client_escape_hatch() {
|
||||
let _source_new: fn(
|
||||
ksp_onchain_transport_lib::YellowstoneGrpcChannel,
|
||||
ksp_onchain_transport_lib::YellowstoneSubscribeRequest,
|
||||
ksp_onchain_transport_lib::HttpTransportPool,
|
||||
ksp_onchain_transport_lib::HttpRoleName,
|
||||
) -> ksp_core_lib::Result<ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestYellowstoneSource> =
|
||||
ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestYellowstoneSource::new;
|
||||
let _resources_new: fn(
|
||||
ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestYellowstoneSource,
|
||||
) -> ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestRuntimeResources =
|
||||
ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestRuntimeResources::new;
|
||||
let _start_with_resources: fn(
|
||||
ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestSettings,
|
||||
std::sync::Arc<ksp_store_lib::Store>,
|
||||
ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestRuntimeResources,
|
||||
) -> ksp_core_lib::Result<ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestHandle> =
|
||||
ksp_worker_raw_transaction_ingest_lib::RawTransactionIngestWorker::start_with_runtime_resources;
|
||||
let source = include_str!("../src/runtime_resources.rs");
|
||||
for forbidden in [
|
||||
"pub fn channel(",
|
||||
"pub fn http_pool(",
|
||||
"pub fn subscribe_request(",
|
||||
"pub fn hydration_role(",
|
||||
"pub fn enqueue(",
|
||||
"pub fn send(",
|
||||
"pub fn inner(",
|
||||
] {
|
||||
assert!(!source.contains(forbidden), "runtime-resource implementation escape hatch present: {forbidden}");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user