Skip to content

Commit

Permalink
Extend unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaeling committed Nov 5, 2024
1 parent c1ccdba commit 64e770e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions databroker/src/grpc/sdv_databroker_v1/collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,16 +314,14 @@ mod tests {

let datapoint: proto::Datapoint = proto::Datapoint {
timestamp: None,
value: Some(proto::datapoint::Value::Int32Value(136)),
value: Some(proto::datapoint::Value::Int32Value(50)),
};

let mut datapoints = HashMap::new();
datapoints.insert(entry_id_1, datapoint.clone());
datapoints.insert(entry_id_2, datapoint);

let request = proto::UpdateDatapointsRequest {
datapoints: datapoints,
};
let request = proto::UpdateDatapointsRequest { datapoints };

// Manually insert permissions
let mut publish_value_request = tonic::Request::new(request);
Expand All @@ -345,7 +343,7 @@ mod tests {
let error_entry_2 = response.errors.get(&entry_id_2);
assert_eq!(
error_entry_2.unwrap().clone(),
proto::DatapointError::OutOfBounds as i32
proto::DatapointError::InvalidType as i32
);
}
Err(_) => {
Expand Down

0 comments on commit 64e770e

Please sign in to comment.