mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-05-30 03:49:28 -07:00
rebasing with upsream (webdav and wifi client)
This commit is contained in:
committed by
Will Greenberg
parent
049a842987
commit
fc5593f00b
@@ -148,7 +148,9 @@ pub async fn post_gps(
|
||||
}
|
||||
}
|
||||
} else {
|
||||
info!("GPS data received but no recording is active — position updated in memory only, not persisted to sidecar");
|
||||
info!(
|
||||
"GPS data received but no recording is active — position updated in memory only, not persisted to sidecar"
|
||||
);
|
||||
}
|
||||
|
||||
Ok(StatusCode::OK)
|
||||
|
||||
@@ -316,7 +316,9 @@ async fn run_with_config(
|
||||
timestamp: 0,
|
||||
}),
|
||||
_ => {
|
||||
warn!("gps_mode is Fixed but gps_fixed_latitude or gps_fixed_longitude is missing from config — no GPS coordinates will be recorded");
|
||||
warn!(
|
||||
"gps_mode is Fixed but gps_fixed_latitude or gps_fixed_longitude is missing from config — no GPS coordinates will be recorded"
|
||||
);
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
@@ -639,7 +639,7 @@ mod tests {
|
||||
async fn test_mark_entry_as_uploaded_sets_time_and_persists() {
|
||||
let dir = make_temp_dir();
|
||||
let mut store = RecordingStore::create(dir.path()).await.unwrap();
|
||||
let _ = store.new_entry().await.unwrap();
|
||||
let _ = store.new_entry(GpsMode::Disabled).await.unwrap();
|
||||
let name = store.manifest.entries[0].name.clone();
|
||||
store.close_current_entry().await.unwrap();
|
||||
|
||||
@@ -670,7 +670,7 @@ mod tests {
|
||||
let mut store = RecordingStore::create(dir.path()).await.unwrap();
|
||||
|
||||
for _ in 0..3 {
|
||||
let _ = store.new_entry().await.unwrap();
|
||||
let _ = store.new_entry(GpsMode::Disabled).await.unwrap();
|
||||
}
|
||||
|
||||
store.manifest.entries[0].name = "entry-0".to_owned();
|
||||
|
||||
@@ -513,7 +513,7 @@ pub async fn debug_set_display_state(
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::config::GpsMode as _;
|
||||
use crate::config::GpsMode;
|
||||
use async_zip::base::read::mem::ZipFileReader;
|
||||
use axum::extract::{Path, State};
|
||||
use tempfile::TempDir;
|
||||
|
||||
@@ -11,7 +11,7 @@ use tokio::{select, sync::RwLock, time};
|
||||
use tokio_util::io::ReaderStream;
|
||||
use tokio_util::{sync::CancellationToken, task::TaskTracker};
|
||||
|
||||
use crate::config::WebdavConfig;
|
||||
use crate::config::{GpsMode, WebdavConfig};
|
||||
use crate::qmdl_store::RecordingStore;
|
||||
|
||||
pub struct WebdavUploadWorkerConfig {
|
||||
@@ -313,7 +313,7 @@ mod tests {
|
||||
dir: &std::path::Path,
|
||||
) -> (Arc<RwLock<RecordingStore>>, String) {
|
||||
let mut store = RecordingStore::create(dir).await.unwrap();
|
||||
let (mut qmdl_file, mut analysis_file) = store.new_entry().await.unwrap();
|
||||
let (mut qmdl_file, mut analysis_file) = store.new_entry(GpsMode::Disabled).await.unwrap();
|
||||
qmdl_file.write_all(b"fake qmdl payload").await.unwrap();
|
||||
qmdl_file.flush().await.unwrap();
|
||||
analysis_file
|
||||
|
||||
Reference in New Issue
Block a user