test(net): consolidate live API smoke tests
This commit is contained in:
1 parent
e21f68fd7c
commit
9b17ec96c5
9 files changed
+201
-249
No files matched your search
@@ -193,41 +193,3 @@ pub async fn download_fabric_libraries(
|
||||
tracing::debug!("Fabric library resolution complete for {}", profile.id);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::net::HttpClient;
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "hits live Fabric API"]
|
||||
async fn test_fetch_versions() {
|
||||
let client = HttpClient::new();
|
||||
match fetch_fabric_versions(&client, "1.20.1").await {
|
||||
Ok(versions) => {
|
||||
assert!(
|
||||
!versions.is_empty(),
|
||||
"Should have Fabric versions for 1.20.1"
|
||||
);
|
||||
assert!(
|
||||
versions[0].loader.version.contains('.'),
|
||||
"Version should be semver-like"
|
||||
);
|
||||
}
|
||||
Err(e) => panic!("fetch_fabric_versions failed: {}", e),
|
||||
}
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore = "hits live Fabric API"]
|
||||
async fn test_fetch_game_versions() {
|
||||
let client = HttpClient::new();
|
||||
match fetch_fabric_game_versions(&client).await {
|
||||
Ok(versions) => {
|
||||
assert!(!versions.is_empty(), "Should have Fabric game versions");
|
||||
assert!(versions.iter().any(|version| version.id == "1.20.1"));
|
||||
}
|
||||
Err(e) => panic!("fetch_fabric_game_versions failed: {}", e),
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user