You've already forked AstralRinth
forked from didirus/AstralRinth
Version updates (#3626)
* Update some Labrinth dependencies * Update some Labrinth dependencies * Update some Labrinth dependencies * Update zip in Labrinth * Update itertools in Labrinth * Update validator in labrinth * Update thiserror in labrinth * Update rust_decimal, redis, and deadpool-redis in labrinth * Update totp-rs and spdx in labrinth * Update maxminddb and tar in labrinth * Update sentry and sentry-actix in labrinth * Update image in labrinth * Update lettre in labrinth * Update derive-new and rust_iso3166 in labrinth * Update async-stripe and json-patch in labrinth * Update clap and iana-time-zone in labrinth * Update labrinth to Rust 2024 * Cargo fmt * Just do a full cargo update * Update daedelus to Rust 2024 * Update daedelus_client to Rust 2024 * Set the formatting edition to 2024 * Fix formatting IntelliJ messed up my formatting
This commit is contained in:
@@ -8,7 +8,7 @@ use bytes::Bytes;
|
||||
use crate::common::database::USER_USER_PAT;
|
||||
use crate::common::{
|
||||
api_v2::ApiV2,
|
||||
environment::{with_test_environment, TestEnvironment},
|
||||
environment::{TestEnvironment, with_test_environment},
|
||||
};
|
||||
#[actix_rt::test]
|
||||
pub async fn error_404_empty() {
|
||||
|
||||
@@ -2,7 +2,7 @@ use crate::common::{
|
||||
api_common::ApiTeams,
|
||||
api_v2::ApiV2,
|
||||
database::{FRIEND_USER_ID, FRIEND_USER_PAT, USER_USER_PAT},
|
||||
environment::{with_test_environment, TestEnvironment},
|
||||
environment::{TestEnvironment, with_test_environment},
|
||||
};
|
||||
|
||||
#[actix_rt::test]
|
||||
|
||||
@@ -4,13 +4,13 @@ use crate::{
|
||||
assert_status,
|
||||
common::{
|
||||
api_common::{ApiProject, ApiVersion, AppendsOptionalPat},
|
||||
api_v2::{request_data::get_public_project_creation_data_json, ApiV2},
|
||||
api_v2::{ApiV2, request_data::get_public_project_creation_data_json},
|
||||
database::{
|
||||
generate_random_name, ADMIN_USER_PAT, FRIEND_USER_ID,
|
||||
FRIEND_USER_PAT, USER_USER_PAT,
|
||||
ADMIN_USER_PAT, FRIEND_USER_ID, FRIEND_USER_PAT, USER_USER_PAT,
|
||||
generate_random_name,
|
||||
},
|
||||
dummy_data::TestFile,
|
||||
environment::{with_test_environment, TestEnvironment},
|
||||
environment::{TestEnvironment, with_test_environment},
|
||||
permissions::{PermissionsTest, PermissionsTestContext},
|
||||
},
|
||||
};
|
||||
@@ -18,6 +18,7 @@ use actix_http::StatusCode;
|
||||
use actix_web::test;
|
||||
use ariadne::ids::base62_impl::parse_base62;
|
||||
use futures::StreamExt;
|
||||
use hex::ToHex;
|
||||
use itertools::Itertools;
|
||||
use labrinth::{
|
||||
database::models::project_item::PROJECTS_SLUGS_NAMESPACE,
|
||||
@@ -25,6 +26,7 @@ use labrinth::{
|
||||
util::actix::{AppendsMultipart, MultipartSegment, MultipartSegmentData},
|
||||
};
|
||||
use serde_json::json;
|
||||
use sha1::Digest;
|
||||
|
||||
#[actix_rt::test]
|
||||
async fn test_project_type_sanity() {
|
||||
@@ -202,9 +204,8 @@ async fn test_add_remove_project() {
|
||||
let uploaded_version_id = project.versions[0];
|
||||
|
||||
// Checks files to ensure they were uploaded and correctly identify the file
|
||||
let hash = sha1::Sha1::from(basic_mod_file.bytes())
|
||||
.digest()
|
||||
.to_string();
|
||||
let hash = sha1::Sha1::digest(basic_mod_file.bytes())
|
||||
.encode_hex::<String>();
|
||||
let version = api
|
||||
.get_version_from_hash_deserialized(
|
||||
&hash,
|
||||
@@ -468,7 +469,7 @@ async fn permissions_patch_project_v2() {
|
||||
.map(|(key, value)| {
|
||||
let test_env = test_env.clone();
|
||||
async move {
|
||||
let req_gen = |ctx: PermissionsTestContext| async {
|
||||
let req_gen = async |ctx: PermissionsTestContext| {
|
||||
api.edit_project(
|
||||
&ctx.project_id.unwrap(),
|
||||
json!({
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
use crate::common::api_common::ApiProject;
|
||||
use crate::common::api_common::ApiVersion;
|
||||
use crate::common::api_v2::request_data::get_public_project_creation_data;
|
||||
use crate::common::api_v2::ApiV2;
|
||||
use crate::common::api_v2::request_data::get_public_project_creation_data;
|
||||
use crate::common::dummy_data::TestFile;
|
||||
use crate::common::environment::with_test_environment;
|
||||
use crate::common::environment::TestEnvironment;
|
||||
use crate::common::environment::with_test_environment;
|
||||
use crate::common::scopes::ScopeTest;
|
||||
use ariadne::ids::base62_impl::parse_base62;
|
||||
use labrinth::models::pats::Scopes;
|
||||
|
||||
@@ -5,10 +5,10 @@ use crate::common::api_common::ApiVersion;
|
||||
use crate::common::api_v2::ApiV2;
|
||||
|
||||
use crate::common::database::*;
|
||||
use crate::common::dummy_data::TestFile;
|
||||
use crate::common::dummy_data::DUMMY_CATEGORIES;
|
||||
use crate::common::environment::with_test_environment;
|
||||
use crate::common::dummy_data::TestFile;
|
||||
use crate::common::environment::TestEnvironment;
|
||||
use crate::common::environment::with_test_environment;
|
||||
use actix_http::StatusCode;
|
||||
use ariadne::ids::base62_impl::parse_base62;
|
||||
use futures::stream::StreamExt;
|
||||
|
||||
@@ -5,7 +5,7 @@ use std::collections::HashSet;
|
||||
|
||||
use crate::common::{
|
||||
api_v2::ApiV2,
|
||||
environment::{with_test_environment, TestEnvironment},
|
||||
environment::{TestEnvironment, with_test_environment},
|
||||
};
|
||||
|
||||
#[actix_rt::test]
|
||||
|
||||
@@ -11,7 +11,7 @@ use crate::{
|
||||
FRIEND_USER_ID, FRIEND_USER_ID_PARSED, FRIEND_USER_PAT,
|
||||
USER_USER_ID_PARSED, USER_USER_PAT,
|
||||
},
|
||||
environment::{with_test_environment, TestEnvironment},
|
||||
environment::{TestEnvironment, with_test_environment},
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ use crate::common::api_v2::ApiV2;
|
||||
|
||||
use crate::common::api_v2::request_data::get_public_project_creation_data;
|
||||
use crate::common::dummy_data::{DummyProjectAlpha, DummyProjectBeta};
|
||||
use crate::common::environment::{with_test_environment, TestEnvironment};
|
||||
use crate::common::environment::{TestEnvironment, with_test_environment};
|
||||
use crate::common::{
|
||||
database::{ENEMY_USER_PAT, USER_USER_PAT},
|
||||
dummy_data::TestFile,
|
||||
@@ -470,10 +470,10 @@ async fn add_version_project_types_v2() {
|
||||
)
|
||||
.await;
|
||||
assert_eq!(test_project.project_type, "project"); // No project_type set, as no versions are set
|
||||
// Default to 'project' if none are found
|
||||
// This is a known difference between older v2 ,but is acceptable.
|
||||
// This would be the appropriate test on older v2:
|
||||
// assert_eq!(test_project.project_type, "modpack");
|
||||
// Default to 'project' if none are found
|
||||
// This is a known difference between older v2 ,but is acceptable.
|
||||
// This would be the appropriate test on older v2:
|
||||
// assert_eq!(test_project.project_type, "modpack");
|
||||
|
||||
// Create a version with a modpack file attached
|
||||
let test_version = api
|
||||
|
||||
Reference in New Issue
Block a user