Skip to content

Commit

Permalink
data proxy analyze test
Browse files Browse the repository at this point in the history
  • Loading branch information
bdbai committed Mar 11, 2024
1 parent 5866a40 commit e9b06af
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ytflow-app-util/src/proxy/data/analyze.rs
Original file line number Diff line number Diff line change
@@ -32,3 +32,14 @@ pub fn analyze_data_proxy(name: String, proxy: &[u8], version: u16) -> AnalyzeRe
}
super::v1::analyzer::analyze(name, proxy)
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn test_analyze_data_proxy_invalid_version() {
let result = analyze_data_proxy("test".into(), &[], 1);
assert_eq!(result, Err(AnalyzeError::UnknownVersion));
}
}

0 comments on commit e9b06af

Please sign in to comment.