diff options
Diffstat (limited to 'test_util')
-rw-r--r-- | test_util/Cargo.toml | 1 | ||||
-rw-r--r-- | test_util/build.rs | 22 | ||||
-rw-r--r-- | test_util/src/kv_remote.rs | 7 | ||||
-rw-r--r-- | test_util/src/lib.rs | 19 |
4 files changed, 9 insertions, 40 deletions
diff --git a/test_util/Cargo.toml b/test_util/Cargo.toml index f48fce0b3..72126ae66 100644 --- a/test_util/Cargo.toml +++ b/test_util/Cargo.toml @@ -19,6 +19,7 @@ async-stream = "0.3.3" base64.workspace = true bytes.workspace = true console_static_text.workspace = true +denokv_proto.workspace = true fastwebsockets = { workspace = true, features = ["upgrade"] } flate2.workspace = true futures.workspace = true diff --git a/test_util/build.rs b/test_util/build.rs deleted file mode 100644 index 420abd0a1..000000000 --- a/test_util/build.rs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. - -use std::env; -use std::io; -use std::path::PathBuf; - -fn main() -> io::Result<()> { - println!("cargo:rerun-if-changed=../ext/kv/proto"); - - let descriptor_path = - PathBuf::from(env::var("OUT_DIR").unwrap()).join("proto_descriptor.bin"); - - prost_build::Config::new() - .file_descriptor_set_path(&descriptor_path) - .compile_well_known_types() - .compile_protos( - &["../ext/kv/proto/datapath.proto"], - &["../ext/kv/proto/"], - )?; - - Ok(()) -} diff --git a/test_util/src/kv_remote.rs b/test_util/src/kv_remote.rs deleted file mode 100644 index d258a0551..000000000 --- a/test_util/src/kv_remote.rs +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. - -// Generated code, disable lints -#[allow(clippy::all, non_snake_case)] -pub mod datapath { - include!(concat!(env!("OUT_DIR"), "/datapath.rs")); -} diff --git a/test_util/src/lib.rs b/test_util/src/lib.rs index b7106a2b3..692a6a08c 100644 --- a/test_util/src/lib.rs +++ b/test_util/src/lib.rs @@ -4,6 +4,12 @@ use anyhow::anyhow; use base64::prelude::BASE64_STANDARD; use base64::Engine; +use denokv_proto::datapath::AtomicWrite; +use denokv_proto::datapath::AtomicWriteOutput; +use denokv_proto::datapath::AtomicWriteStatus; +use denokv_proto::datapath::ReadRangeOutput; +use denokv_proto::datapath::SnapshotRead; +use denokv_proto::datapath::SnapshotReadOutput; use futures::Future; use futures::FutureExt; use futures::Stream; @@ -18,12 +24,6 @@ use hyper::Body; use hyper::Request; use hyper::Response; use hyper::StatusCode; -use kv_remote::datapath::AtomicWrite; -use kv_remote::datapath::AtomicWriteOutput; -use kv_remote::datapath::AtomicWriteStatus; -use kv_remote::datapath::ReadRangeOutput; -use kv_remote::datapath::SnapshotRead; -use kv_remote::datapath::SnapshotReadOutput; use npm::CUSTOM_NPM_PACKAGE_CACHE; use once_cell::sync::Lazy; use pretty_assertions::assert_eq; @@ -70,7 +70,6 @@ pub mod assertions; mod builders; pub mod factory; mod fs; -mod kv_remote; pub mod lsp; mod npm; pub mod pty; @@ -1206,7 +1205,7 @@ async fn main_server( .header("content-type", "application/json") .body(Body::from( serde_json::json!({ - "version": 2, + "version": 1000, "databaseId": KV_DATABASE_ID, "endpoints": [ { @@ -1268,9 +1267,7 @@ async fn main_server( .map(|_| ReadRangeOutput { values: vec![] }) .collect(), read_disabled: false, - regions_if_read_disabled: vec![], read_is_strongly_consistent: true, - primary_if_not_strongly_consistent: "".into(), } .encode_to_vec(), )) @@ -1311,7 +1308,7 @@ async fn main_server( AtomicWriteOutput { status: AtomicWriteStatus::AwSuccess.into(), versionstamp: vec![0u8; 10], - primary_if_write_disabled: "".into(), + failed_checks: vec![], } .encode_to_vec(), )) |