Fix clippy errors + lint, use turbo CI

This commit is contained in:
Jai A
2024-10-18 16:07:35 -07:00
parent 663ab83b08
commit 8dd955563e
186 changed files with 10615 additions and 6433 deletions

View File

@@ -4,8 +4,8 @@ use futures::Future;
use labrinth::models::pats::Scopes;
use super::{
api_common::Api, database::USER_USER_ID_PARSED, environment::TestEnvironment,
pats::create_test_pat,
api_common::Api, database::USER_USER_ID_PARSED,
environment::TestEnvironment, pats::create_test_pat,
};
// A reusable test type that works for any scope test testing an endpoint that:
@@ -74,10 +74,13 @@ impl<'a, A: Api> ScopeTest<'a, A> {
.failure_scopes
.unwrap_or(Scopes::all() ^ success_scopes);
let access_token_all_others =
create_test_pat(failure_scopes, self.user_id, &self.test_env.db).await;
create_test_pat(failure_scopes, self.user_id, &self.test_env.db)
.await;
// Create a PAT with the success scopes
let access_token = create_test_pat(success_scopes, self.user_id, &self.test_env.db).await;
let access_token =
create_test_pat(success_scopes, self.user_id, &self.test_env.db)
.await;
// Perform test twice, once with each PAT
// the first time, we expect a 401 (or known failure code)