ci: fix tests for PRs
This commit is contained in:
parent
7b0499f6b7
commit
07fd62c560
2 changed files with 26 additions and 2 deletions
|
|
@ -34,7 +34,7 @@ jobs:
|
|||
env:
|
||||
ALL_PROXY: "http://warpproxy:8124"
|
||||
RUSTYPIPE_CACHE: "${{ secrets.RUSTYPIPE_CACHE }}"
|
||||
YT_AUTHENTICATED: "1"
|
||||
YT_AUTHENTICATED: "${{ github.event_name != 'pull_request' }}" # no access to secrets for PRs
|
||||
|
||||
- name: 💌 Upload test report
|
||||
if: always()
|
||||
|
|
|
|||
|
|
@ -1748,6 +1748,27 @@ async fn music_artist(
|
|||
}
|
||||
}
|
||||
|
||||
#[rstest]
|
||||
#[tokio::test]
|
||||
async fn music_artist_albums_recency(rp: RustyPipe) {
|
||||
let albums = rp
|
||||
.query()
|
||||
.music_artist_albums("UCPC0L1d253x-KuMNwa05TpA", None, Some(AlbumOrder::Recency))
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
assert_gte(albums.len(), 110, "albums");
|
||||
|
||||
let mut latest_items = albums.iter().peekable();
|
||||
while let (Some(b), Some(next_b)) = (latest_items.next(), latest_items.peek()) {
|
||||
assert_gte(
|
||||
b.year.expect("year"),
|
||||
next_b.year.expect("year"),
|
||||
"latest album year",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[rstest]
|
||||
#[tokio::test]
|
||||
async fn music_artist_not_found(rp: RustyPipe) {
|
||||
|
|
@ -2717,7 +2738,10 @@ fn unlocalized(lang: Language) -> bool {
|
|||
/// Get a flag signaling if an authenticated user is expected
|
||||
#[fixture]
|
||||
fn auth_enabled(rp: RustyPipe) -> bool {
|
||||
std::env::var("YT_AUTHENTICATED").is_ok() || rp.query().auth_enabled()
|
||||
std::env::var("YT_AUTHENTICATED")
|
||||
.map(|v| !v.is_empty() && v.to_ascii_lowercase() != "false")
|
||||
.unwrap_or_default()
|
||||
|| rp.query().auth_enabled()
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Reference in a new issue