mirror of
https://github.com/MingweiSamuel/Riven.git
synced 2024-12-27 03:16:33 +00:00
Add status tests for new regions (except taiwan TW2)
This commit is contained in:
parent
08e276a558
commit
6c5af2bfd6
6 changed files with 118 additions and 1 deletions
|
@ -166,7 +166,7 @@ async_tests!{
|
||||||
},
|
},
|
||||||
|
|
||||||
status: async {
|
status: async {
|
||||||
let p = RIOT_API.lol_status_v4().get_platform_data(PlatformRoute::NA1);
|
let p = RIOT_API.lol_status_v4().get_platform_data(ROUTE);
|
||||||
let status = p.await.map_err(|e| e.to_string())?;
|
let status = p.await.map_err(|e| e.to_string())?;
|
||||||
println!("{:?}", status);
|
println!("{:?}", status);
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
23
riven/tests/tests_ph2.rs
Normal file
23
riven/tests/tests_ph2.rs
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
#![cfg_attr(feature = "nightly", feature(custom_test_frameworks))]
|
||||||
|
#![cfg_attr(feature = "nightly", test_runner(my_runner))]
|
||||||
|
|
||||||
|
mod async_tests;
|
||||||
|
mod testutils;
|
||||||
|
use testutils::*;
|
||||||
|
|
||||||
|
use colored::*;
|
||||||
|
|
||||||
|
use riven::consts::*;
|
||||||
|
|
||||||
|
const ROUTE: PlatformRoute = PlatformRoute::PH2;
|
||||||
|
|
||||||
|
async_tests!{
|
||||||
|
my_runner {
|
||||||
|
status: async {
|
||||||
|
let p = RIOT_API.lol_status_v4().get_platform_data(ROUTE);
|
||||||
|
let status = p.await.map_err(|e| e.to_string())?;
|
||||||
|
println!("{:?}", status);
|
||||||
|
Ok(())
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
23
riven/tests/tests_sg2.rs
Normal file
23
riven/tests/tests_sg2.rs
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
#![cfg_attr(feature = "nightly", feature(custom_test_frameworks))]
|
||||||
|
#![cfg_attr(feature = "nightly", test_runner(my_runner))]
|
||||||
|
|
||||||
|
mod async_tests;
|
||||||
|
mod testutils;
|
||||||
|
use testutils::*;
|
||||||
|
|
||||||
|
use colored::*;
|
||||||
|
|
||||||
|
use riven::consts::*;
|
||||||
|
|
||||||
|
const ROUTE: PlatformRoute = PlatformRoute::SG2;
|
||||||
|
|
||||||
|
async_tests!{
|
||||||
|
my_runner {
|
||||||
|
status: async {
|
||||||
|
let p = RIOT_API.lol_status_v4().get_platform_data(ROUTE);
|
||||||
|
let status = p.await.map_err(|e| e.to_string())?;
|
||||||
|
println!("{:?}", status);
|
||||||
|
Ok(())
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
23
riven/tests/tests_th2.rs
Normal file
23
riven/tests/tests_th2.rs
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
#![cfg_attr(feature = "nightly", feature(custom_test_frameworks))]
|
||||||
|
#![cfg_attr(feature = "nightly", test_runner(my_runner))]
|
||||||
|
|
||||||
|
mod async_tests;
|
||||||
|
mod testutils;
|
||||||
|
use testutils::*;
|
||||||
|
|
||||||
|
use colored::*;
|
||||||
|
|
||||||
|
use riven::consts::*;
|
||||||
|
|
||||||
|
const ROUTE: PlatformRoute = PlatformRoute::TH2;
|
||||||
|
|
||||||
|
async_tests!{
|
||||||
|
my_runner {
|
||||||
|
status: async {
|
||||||
|
let p = RIOT_API.lol_status_v4().get_platform_data(ROUTE);
|
||||||
|
let status = p.await.map_err(|e| e.to_string())?;
|
||||||
|
println!("{:?}", status);
|
||||||
|
Ok(())
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
25
riven/tests/tests_tw2.rs.ignored
Normal file
25
riven/tests/tests_tw2.rs.ignored
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
#![cfg_attr(feature = "nightly", feature(custom_test_frameworks))]
|
||||||
|
#![cfg_attr(feature = "nightly", test_runner(my_runner))]
|
||||||
|
|
||||||
|
mod async_tests;
|
||||||
|
mod testutils;
|
||||||
|
use testutils::*;
|
||||||
|
|
||||||
|
use colored::*;
|
||||||
|
|
||||||
|
use riven::consts::*;
|
||||||
|
|
||||||
|
const ROUTE: PlatformRoute = PlatformRoute::TW2;
|
||||||
|
|
||||||
|
async_tests!{
|
||||||
|
my_runner {
|
||||||
|
// TODO: for some reason status is not available on TW2...
|
||||||
|
// https://developer.riotgames.com/apis#lol-status-v4/GET_getPlatformData
|
||||||
|
status: async {
|
||||||
|
let p = RIOT_API.lol_status_v4().get_platform_data(ROUTE);
|
||||||
|
let status = p.await.map_err(|e| e.to_string())?;
|
||||||
|
println!("{:?}", status);
|
||||||
|
Ok(())
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
23
riven/tests/tests_vn2.rs
Normal file
23
riven/tests/tests_vn2.rs
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
#![cfg_attr(feature = "nightly", feature(custom_test_frameworks))]
|
||||||
|
#![cfg_attr(feature = "nightly", test_runner(my_runner))]
|
||||||
|
|
||||||
|
mod async_tests;
|
||||||
|
mod testutils;
|
||||||
|
use testutils::*;
|
||||||
|
|
||||||
|
use colored::*;
|
||||||
|
|
||||||
|
use riven::consts::*;
|
||||||
|
|
||||||
|
const ROUTE: PlatformRoute = PlatformRoute::VN2;
|
||||||
|
|
||||||
|
async_tests!{
|
||||||
|
my_runner {
|
||||||
|
status: async {
|
||||||
|
let p = RIOT_API.lol_status_v4().get_platform_data(ROUTE);
|
||||||
|
let status = p.await.map_err(|e| e.to_string())?;
|
||||||
|
println!("{:?}", status);
|
||||||
|
Ok(())
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue