summaryrefslogtreecommitdiffstats
path: root/third_party/rust/glean/tests/schema.rs
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/rust/glean/tests/schema.rs')
-rw-r--r--third_party/rust/glean/tests/schema.rs13
1 files changed, 4 insertions, 9 deletions
diff --git a/third_party/rust/glean/tests/schema.rs b/third_party/rust/glean/tests/schema.rs
index 0a1bf4d2e8..01a2108b3c 100644
--- a/third_party/rust/glean/tests/schema.rs
+++ b/third_party/rust/glean/tests/schema.rs
@@ -10,7 +10,7 @@ use glean_core::TextMetric;
use jsonschema_valid::{self, schemas::Draft};
use serde_json::Value;
-use glean::net::UploadResult;
+use glean::net::{PingUploadRequest, UploadResult};
use glean::private::*;
use glean::{
traits, ClientInfoMetrics, CommonMetricData, ConfigurationBuilder, HistogramType, MemoryUnit,
@@ -60,13 +60,8 @@ fn validate_against_schema() {
sender: crossbeam_channel::Sender<Vec<u8>>,
}
impl glean::net::PingUploader for ValidatingUploader {
- fn upload(
- &self,
- _url: String,
- body: Vec<u8>,
- _headers: Vec<(String, String)>,
- ) -> UploadResult {
- self.sender.send(body).unwrap();
+ fn upload(&self, ping_request: PingUploadRequest) -> UploadResult {
+ self.sender.send(ping_request.body).unwrap();
UploadResult::http_status(200)
}
}
@@ -176,7 +171,7 @@ fn validate_against_schema() {
text_metric.set("loooooong text".repeat(100));
// Define a new ping and submit it.
- let custom_ping = glean::private::PingType::new(PING_NAME, true, true, true, vec![]);
+ let custom_ping = glean::private::PingType::new(PING_NAME, true, true, true, true, vec![]);
custom_ping.submit(None);
// Wait for the ping to arrive.