Disable failing tournamentstub test

This commit is contained in:
Mingwei Samuel 2023-01-07 17:53:40 -08:00
parent d05c3a11d4
commit 342c87e682

View file

@ -8,7 +8,7 @@ use testutils::*;
use colored::*; use colored::*;
use riven::consts::*; use riven::consts::*;
use riven::models::tournament_stub_v4::*; // use riven::models::tournament_stub_v4::*;
const ROUTE: RegionalRoute = RegionalRoute::AMERICAS; const ROUTE: RegionalRoute = RegionalRoute::AMERICAS;
@ -27,51 +27,52 @@ static MATCHES: &[&str] = &[
async_tests!{ async_tests!{
my_runner { my_runner {
// Champion Mastery tests. // TODO FAILING since 2022/11/28 https://github.com/MingweiSamuel/Riven/actions/runs/3571320200/jobs/6003088646
tournamentstub: async { // // Champion Mastery tests.
let tsv4 = RIOT_API.tournament_stub_v4(); // tournamentstub: async {
let provider_id = tsv4.register_provider_data(ROUTE, &ProviderRegistrationParameters { // let tsv4 = RIOT_API.tournament_stub_v4();
region: PlatformRoute::NA1.as_region_str().to_owned(), // let provider_id = tsv4.register_provider_data(ROUTE, &ProviderRegistrationParameters {
url: "https://github.com/MingweiSamuel/Riven".to_owned(), // region: PlatformRoute::NA1.as_region_str().to_owned(),
}) // url: "https://github.com/MingweiSamuel/Riven".to_owned(),
.await // })
.map_err(|e| e.to_string())?; // .await
// .map_err(|e| e.to_string())?;
println!("provider_id: {}", provider_id); // println!("provider_id: {}", provider_id);
let tournament_id = tsv4.register_tournament(ROUTE, &TournamentRegistrationParameters { // let tournament_id = tsv4.register_tournament(ROUTE, &TournamentRegistrationParameters {
name: Some("Riven Tourney :)".to_owned()), // name: Some("Riven Tourney :)".to_owned()),
provider_id, // provider_id,
}) // })
.await // .await
.map_err(|e| e.to_string())?; // .map_err(|e| e.to_string())?;
println!("tournament_id: {}", tournament_id); // println!("tournament_id: {}", tournament_id);
let codes_result = tsv4.create_tournament_code(ROUTE, &TournamentCodeParameters { // let codes_result = tsv4.create_tournament_code(ROUTE, &TournamentCodeParameters {
map_type: "SUMMONERS_RIFT".to_owned(), // map_type: "SUMMONERS_RIFT".to_owned(),
metadata: Some("eW91IGZvdW5kIHRoZSBzZWNyZXQgbWVzc2FnZQ==".to_owned()), // metadata: Some("eW91IGZvdW5kIHRoZSBzZWNyZXQgbWVzc2FnZQ==".to_owned()),
pick_type: "TOURNAMENT_DRAFT".to_owned(), // pick_type: "TOURNAMENT_DRAFT".to_owned(),
spectator_type: "ALL".to_owned(), // spectator_type: "ALL".to_owned(),
team_size: 5, // team_size: 5,
allowed_summoner_ids: None, // allowed_summoner_ids: None,
}, tournament_id as i64, Some(300)) // }, tournament_id as i64, Some(300))
.await; // .await;
match codes_result { // match codes_result {
Ok(codes) => { // Ok(codes) => {
rassert_eq!(300, codes.len()); // rassert_eq!(300, codes.len());
println!("codes: {}", codes.join(", ")); // println!("codes: {}", codes.join(", "));
Ok(()) // Ok(())
} // }
Err(mut e) => { // Err(mut e) => {
if let Some(response) = e.take_response() { // if let Some(response) = e.take_response() {
eprintln!("{:?}", response.text().await); // eprintln!("{:?}", response.text().await);
} // }
Err(e.to_string()) // Err(e.to_string())
} // }
} // }
}, // },
match_v5_get: async { match_v5_get: async {
match_v5_get(ROUTE, MATCHES).await match_v5_get(ROUTE, MATCHES).await