Fmt & Added CI
This commit is contained in:
parent
39fe1b820b
commit
b939961181
16 changed files with 181 additions and 104 deletions
|
|
@ -30,7 +30,11 @@ fn get_geosite_service() -> Result<GeoSiteService, Box<dyn std::error::Error>> {
|
|||
#[test]
|
||||
fn geosite_service_creation() {
|
||||
let service = get_geosite_service();
|
||||
assert!(service.is_ok(), "Failed to create GeoSiteService: {:?}", service.err());
|
||||
assert!(
|
||||
service.is_ok(),
|
||||
"Failed to create GeoSiteService: {:?}",
|
||||
service.err()
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
@ -51,7 +55,10 @@ fn lookup_nonexistent_domain() {
|
|||
};
|
||||
|
||||
let result = service.lookup(domain.value.as_str());
|
||||
assert!(result.is_none(), "Should return none for not existing domain");
|
||||
assert!(
|
||||
result.is_none(),
|
||||
"Should return none for not existing domain"
|
||||
);
|
||||
println!("{:?}", result);
|
||||
}
|
||||
|
||||
|
|
@ -59,10 +66,7 @@ fn lookup_nonexistent_domain() {
|
|||
fn geosite_list_not_empty() {
|
||||
let service = get_geosite_service().expect("Failed to create service");
|
||||
|
||||
assert!(
|
||||
!service.is_empty(),
|
||||
"GeoSiteList should not be empty"
|
||||
);
|
||||
assert!(!service.is_empty(), "GeoSiteList should not be empty");
|
||||
|
||||
println!("Loaded {} GeoSite entries", service.len());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue