mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-29 16:37:07 +00:00
fix(e2e): stub snapshot lease RPCs in lock mock
This commit is contained in:
@@ -23,7 +23,8 @@ use rustfs_protos::{
|
|||||||
proto_gen::node_service::{
|
proto_gen::node_service::{
|
||||||
BatchGenerallyLockRequest, BatchGenerallyLockResponse, BatchReadVersionRequest, BatchReadVersionResponse,
|
BatchGenerallyLockRequest, BatchGenerallyLockResponse, BatchReadVersionRequest, BatchReadVersionResponse,
|
||||||
GenerallyLockRequest, GenerallyLockResponse, GenerallyLockResult, PingRequest, PingResponse,
|
GenerallyLockRequest, GenerallyLockResponse, GenerallyLockResult, PingRequest, PingResponse,
|
||||||
node_service_server::NodeService,
|
SnapshotLeaseMutationResponse, SnapshotLeaseReleaseRequest, SnapshotLeaseRenewRequest, SnapshotLeaseRequest,
|
||||||
|
SnapshotLeaseResponse, node_service_server::NodeService,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
use std::pin::Pin;
|
use std::pin::Pin;
|
||||||
@@ -104,6 +105,27 @@ impl NodeService for MinimalLockNodeService {
|
|||||||
Err(Status::unimplemented("MinimalLockNodeService only supports lock RPCs"))
|
Err(Status::unimplemented("MinimalLockNodeService only supports lock RPCs"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async fn acquire_snapshot_lease(
|
||||||
|
&self,
|
||||||
|
_request: Request<SnapshotLeaseRequest>,
|
||||||
|
) -> Result<Response<SnapshotLeaseResponse>, Status> {
|
||||||
|
Err(Status::unimplemented("MinimalLockNodeService only supports lock RPCs"))
|
||||||
|
}
|
||||||
|
|
||||||
|
async fn renew_snapshot_lease(
|
||||||
|
&self,
|
||||||
|
_request: Request<SnapshotLeaseRenewRequest>,
|
||||||
|
) -> Result<Response<SnapshotLeaseResponse>, Status> {
|
||||||
|
Err(Status::unimplemented("MinimalLockNodeService only supports lock RPCs"))
|
||||||
|
}
|
||||||
|
|
||||||
|
async fn release_snapshot_lease(
|
||||||
|
&self,
|
||||||
|
_request: Request<SnapshotLeaseReleaseRequest>,
|
||||||
|
) -> Result<Response<SnapshotLeaseMutationResponse>, Status> {
|
||||||
|
Err(Status::unimplemented("MinimalLockNodeService only supports lock RPCs"))
|
||||||
|
}
|
||||||
|
|
||||||
async fn lock(&self, request: Request<GenerallyLockRequest>) -> Result<Response<GenerallyLockResponse>, Status> {
|
async fn lock(&self, request: Request<GenerallyLockRequest>) -> Result<Response<GenerallyLockResponse>, Status> {
|
||||||
let request = request.into_inner();
|
let request = request.into_inner();
|
||||||
let args: LockRequest = match serde_json::from_str(&request.args) {
|
let args: LockRequest = match serde_json::from_str(&request.args) {
|
||||||
|
|||||||
Reference in New Issue
Block a user