Taplo and typos in CI, TOML cleanup (#4510)

* Taplo and typos in CI

* Clean up Cargo.toml files

* Fix CI

* Fix CI

* Run typos in CI

* Loosen typos a bit

* Fix typos

* Fix taplo

* Switch to Tombi

* Fix Tombi errors

* Remove unused typos config

* Tombi fmt

* Remove extraneous cargo fmt

* fix typos
This commit is contained in:
aecsocket
2025-10-12 21:18:38 +01:00
committed by GitHub
parent ea594ec27c
commit 4cd8ccd319
46 changed files with 650 additions and 468 deletions

View File

@@ -1,14 +1,11 @@
[package]
name = "theseus_playground"
version = "0.0.0"
edition.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
enumset = { workspace = true }
theseus = { workspace = true, features = ["cli"] }
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
enumset.workspace = true
[lints]
workspace = true

View File

@@ -1,53 +1,51 @@
[package]
name = "theseus_gui"
version = "1.0.0-local" # The actual version is set by the theseus-build workflow on tagging
description = "The Modrinth App is a desktop application for managing your Minecraft mods"
license = "GPL-3.0-only"
repository = "https://github.com/modrinth/code/apps/app/"
# The actual version is set by the theseus-build workflow on tagging
version = "1.0.0-local"
edition.workspace = true
description = "The Modrinth App is a desktop application for managing your Minecraft mods"
repository = "https://github.com/modrinth/code/apps/app/"
license = "GPL-3.0-only"
[dependencies]
chrono = { workspace = true }
daedalus = { workspace = true }
dashmap = { workspace = true }
either = { workspace = true }
enumset = { workspace = true, features = ["serde"] }
hyper = { workspace = true, features = ["server"] }
hyper-util = { workspace = true }
native-dialog = { workspace = true }
paste = { workspace = true }
path-util = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
serde_with = { workspace = true }
tauri = { workspace = true, features = [
"devtools",
"macos-private-api",
"protocol-asset",
] }
tauri-plugin-deep-link = { workspace = true }
tauri-plugin-dialog = { workspace = true }
tauri-plugin-http = { workspace = true }
tauri-plugin-opener = { workspace = true }
tauri-plugin-os = { workspace = true }
tauri-plugin-single-instance = { workspace = true }
tauri-plugin-updater = { workspace = true }
tauri-plugin-window-state = { workspace = true }
theseus = { workspace = true, features = ["tauri"] }
thiserror = { workspace = true }
tokio = { workspace = true, features = ["time"] }
tracing = { workspace = true }
tracing-error = { workspace = true }
url = { workspace = true }
urlencoding = { workspace = true }
uuid = { workspace = true, features = ["serde", "v4"] }
[build-dependencies]
tauri-build = { workspace = true, features = ["codegen"] }
[dependencies]
theseus = { workspace = true, features = ["tauri"] }
path-util.workspace = true
serde_json.workspace = true
serde = { workspace = true, features = ["derive"] }
serde_with.workspace = true
tauri = { workspace = true, features = ["devtools", "macos-private-api", "protocol-asset"] }
tauri-plugin-deep-link.workspace = true
tauri-plugin-dialog.workspace = true
tauri-plugin-http.workspace = true
tauri-plugin-opener.workspace = true
tauri-plugin-os.workspace = true
tauri-plugin-single-instance.workspace = true
tauri-plugin-updater.workspace = true
tauri-plugin-window-state.workspace = true
tokio = { workspace = true, features = ["time"] }
thiserror.workspace = true
daedalus.workspace = true
chrono.workspace = true
either.workspace = true
hyper = { workspace = true, features = ["server"] }
hyper-util.workspace = true
url.workspace = true
urlencoding.workspace = true
uuid = { workspace = true, features = ["serde", "v4"] }
tracing.workspace = true
tracing-error.workspace = true
dashmap.workspace = true
paste.workspace = true
enumset = { workspace = true, features = ["serde"] }
native-dialog.workspace = true
[target.'cfg(target_os = "linux")'.dependencies]
tauri-plugin-updater = { workspace = true, optional = true }

File diff suppressed because one or more lines are too long

View File

@@ -272,7 +272,7 @@ pub struct EditProfile {
#[serde(
default,
skip_serializing_if = "Option::is_none",
with = "::serde_with::rust::double_option"
with = "serde_with::rust::double_option"
)]
pub loader_version: Option<Option<String>>,
@@ -281,45 +281,45 @@ pub struct EditProfile {
#[serde(
default,
skip_serializing_if = "Option::is_none",
with = "::serde_with::rust::double_option"
with = "serde_with::rust::double_option"
)]
pub linked_data: Option<Option<LinkedData>>,
#[serde(
default,
skip_serializing_if = "Option::is_none",
with = "::serde_with::rust::double_option"
with = "serde_with::rust::double_option"
)]
pub java_path: Option<Option<String>>,
#[serde(
default,
skip_serializing_if = "Option::is_none",
with = "::serde_with::rust::double_option"
with = "serde_with::rust::double_option"
)]
pub extra_launch_args: Option<Option<Vec<String>>>,
#[serde(
default,
skip_serializing_if = "Option::is_none",
with = "::serde_with::rust::double_option"
with = "serde_with::rust::double_option"
)]
pub custom_env_vars: Option<Option<Vec<(String, String)>>>,
#[serde(
default,
skip_serializing_if = "Option::is_none",
with = "::serde_with::rust::double_option"
with = "serde_with::rust::double_option"
)]
pub memory: Option<Option<MemorySettings>>,
#[serde(
default,
skip_serializing_if = "Option::is_none",
with = "::serde_with::rust::double_option"
with = "serde_with::rust::double_option"
)]
pub force_fullscreen: Option<Option<bool>>,
#[serde(
default,
skip_serializing_if = "Option::is_none",
with = "::serde_with::rust::double_option"
with = "serde_with::rust::double_option"
)]
pub game_resolution: Option<Option<WindowSize>>,
pub hooks: Option<Hooks>,

View File

@@ -1,39 +1,39 @@
[package]
name = "daedalus_client"
version = "0.2.2"
authors = ["Jai A <jai@modrinth.com>"]
edition.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
daedalus.workspace = true
tokio = { workspace = true, features = ["sync", "macros", "rt-multi-thread"] }
futures.workspace = true
dotenvy.workspace = true
serde = { workspace = true, features = ["derive"] }
serde_json.workspace = true
serde-xml-rs.workspace = true
thiserror.workspace = true
reqwest = { workspace = true, features = ["stream", "json", "rustls-tls-native-roots"] }
async_zip = { workspace = true, features = [
"chrono",
"tokio-fs",
"deflate",
"bzip2",
"zstd",
"deflate64",
"bzip2",
"chrono",
"deflate",
"deflate64",
"tokio-fs",
"zstd",
] }
bytes = { workspace = true }
chrono = { workspace = true, features = ["serde"] }
bytes.workspace = true
rust-s3.workspace = true
dashmap.workspace = true
sha1_smol.workspace = true
daedalus = { workspace = true }
dashmap = { workspace = true }
dotenvy = { workspace = true }
futures = { workspace = true }
indexmap = { workspace = true, features = ["serde"] }
itertools.workspace = true
tracing-error.workspace = true
tracing.workspace = true
itertools = { workspace = true }
reqwest = { workspace = true, features = [
"json",
"rustls-tls-native-roots",
"stream",
] }
rust-s3 = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
serde-xml-rs = { workspace = true }
sha1_smol = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true, features = ["macros", "rt-multi-thread", "sync"] }
tracing = { workspace = true }
tracing-error = { workspace = true }
tracing-subscriber = { workspace = true, features = ["env-filter"] }
[lints]

View File

@@ -38,9 +38,9 @@ Once the user is ready to authorize your application, you need to construct a UR
| `state` | A mechanism to prevent certain attacks. Explained further below. Recommended but optional |
| `redirect_uri` | The URI the user is redirect to after finishing authorization |
You might have noticed the `state` parameter. [CSRF] (Cross-site request forgery), and [clickjacking] are security vulnerabilities that you're recommended to protect against. In OAuth2 this is usually done with the `state` parameter. When the user initiates a request to start authorization, you include a `state` which is unique to this request. This can, for example, be saved in localStorge or a cookie. When the redirect URI is called, you verify that the `state` parameter is the same. Using `state` is optional, but recommended.
You might have noticed the `state` parameter. [CSRF] (Cross-site request forgery), and [clickjacking] are security vulnerabilities that you're recommended to protect against. In OAuth2 this is usually done with the `state` parameter. When the user initiates a request to start authorization, you include a `state` which is unique to this request. This can, for example, be saved in localStorage or a cookie. When the redirect URI is called, you verify that the `state` parameter is the same. Using `state` is optional, but recommended.
The scope identifiers are currently best found in the backend source code located at [`apps/labrinth/src/models/v3/pats.rs`]. The scope parameter is an array of scope identifiers, seperated by a plus sign (`+`).
The scope identifiers are currently best found in the backend source code located at [`apps/labrinth/src/models/v3/pats.rs`]. The scope parameter is an array of scope identifiers, separated by a plus sign (`+`).
The redirect URI is the endpoint on your server that will receive the code which can eventually be used to act on the user's behalf. For security reasons the redirect URI used has to be allowlisted in your application settings. The redirect will contain the following query parameters:

View File

@@ -1,7 +1,6 @@
[package]
name = "labrinth"
version = "2.7.0"
authors = ["geometrically <jai@modrinth.com>"]
edition.workspace = true
license = "AGPL-3.0-only"
@@ -11,148 +10,140 @@ name = "labrinth"
path = "src/main.rs"
[dependencies]
actix-web.workspace = true
actix-rt.workspace = true
actix-multipart.workspace = true
actix-cors.workspace = true
actix-ws.workspace = true
actix-files.workspace = true
prometheus.workspace = true
actix-cors = { workspace = true }
actix-files = { workspace = true }
actix-multipart = { workspace = true }
actix-rt = { workspace = true }
actix-web = { workspace = true }
actix-web-prom = { workspace = true, features = ["process"] }
tracing.workspace = true
tracing-actix-web.workspace = true
console-subscriber.workspace = true
tracing-subscriber.workspace = true
tracing-ecs.workspace = true
eyre.workspace = true
color-eyre.workspace = true
tokio = { workspace = true, features = ["sync", "rt-multi-thread"] }
tokio-stream.workspace = true
futures.workspace = true
futures-util.workspace = true
async-trait.workspace = true
dashmap.workspace = true
paste.workspace = true
meilisearch-sdk = { workspace = true, features = ["reqwest"] }
rust-s3.workspace = true
reqwest = { workspace = true, features = ["http2", "rustls-tls-webpki-roots", "json", "multipart"] }
hyper-rustls.workspace = true
hyper-util.workspace = true
serde = { workspace = true, features = ["derive"] }
serde_json.workspace = true
serde_with.workspace = true
actix-ws = { workspace = true }
argon2 = { workspace = true }
ariadne = { workspace = true }
async-stripe = { workspace = true, features = [
"billing",
"checkout",
"connect",
"webhook-events",
] }
async-trait = { workspace = true }
base64 = { workspace = true }
bitflags = { workspace = true }
bytes = { workspace = true }
censor = { workspace = true }
chrono = { workspace = true, features = ["serde"] }
yaserde = { workspace = true, features = ["derive"] }
rand.workspace = true
rand_chacha.workspace = true
bytes.workspace = true
base64.workspace = true
sha1.workspace = true
sha2.workspace = true
hmac.workspace = true
argon2.workspace = true
murmur2.workspace = true
bitflags.workspace = true
hex.workspace = true
zxcvbn.workspace = true
totp-rs = { workspace = true, features = ["gen_secret"] }
const_format.workspace = true
url.workspace = true
urlencoding.workspace = true
zip.workspace = true
itertools.workspace = true
validator = { workspace = true, features = ["derive"] }
regex.workspace = true
censor.workspace = true
spdx = { workspace = true, features = ["text"] }
dotenvy.workspace = true
thiserror.workspace = true
either.workspace = true
sqlx = { workspace = true, features = [
"runtime-tokio",
"tls-rustls-ring",
"postgres",
"chrono",
"macros",
"migrate",
"rust_decimal",
"json",
] }
rust_decimal = { workspace = true, features = ["serde-with-float", "serde-with-str"] }
redis = { workspace = true, features = ["tokio-comp", "ahash", "r2d2"] }
deadpool-redis.workspace = true
clickhouse = { workspace = true, features = ["uuid", "time"] }
uuid = { workspace = true, features = ["v4", "fast-rng", "serde"] }
maxminddb.workspace = true
flate2.workspace = true
tar.workspace = true
sentry.workspace = true
sentry-actix.workspace = true
image = { workspace = true, features = [
"avif",
"bmp",
"dds",
"exr",
"ff",
"gif",
"hdr",
"ico",
"jpeg",
"png",
"pnm",
"qoi",
"tga",
"tiff",
"webp",
] }
color-thief.workspace = true
webp.workspace = true
woothee.workspace = true
lettre.workspace = true
rust_iso3166.workspace = true
async-stripe = { workspace = true, features = ["billing", "checkout", "connect", "webhook-events"] }
rusty-money.workspace = true
json-patch.workspace = true
ariadne.workspace = true
path-util.workspace = true
clap = { workspace = true, features = ["derive"] }
[target.'cfg(target_os = "linux")'.dependencies]
tikv-jemallocator = { workspace = true, features = [
"profiling",
"unprefixed_malloc_on_supported_platforms",
clickhouse = { workspace = true, features = ["time", "uuid"] }
color-eyre = { workspace = true }
color-thief = { workspace = true }
console-subscriber = { workspace = true }
const_format = { workspace = true }
dashmap = { workspace = true }
deadpool-redis.workspace = true
dotenvy = { workspace = true }
either = { workspace = true }
eyre = { workspace = true }
flate2 = { workspace = true }
futures = { workspace = true }
futures-util = { workspace = true }
hex = { workspace = true }
hmac = { workspace = true }
hyper-rustls = { workspace = true }
hyper-util = { workspace = true }
image = { workspace = true, features = [
"avif",
"bmp",
"dds",
"exr",
"ff",
"gif",
"hdr",
"ico",
"jpeg",
"png",
"pnm",
"qoi",
"tga",
"tiff",
"webp",
] }
tikv-jemalloc-ctl = { workspace = true, features = ["stats"] }
jemalloc_pprof = { workspace = true, features = ["flamegraph"] }
itertools = { workspace = true }
json-patch = { workspace = true }
lettre = { workspace = true }
maxminddb = { workspace = true }
meilisearch-sdk = { workspace = true, features = ["reqwest"] }
murmur2 = { workspace = true }
paste = { workspace = true }
path-util = { workspace = true }
prometheus = { workspace = true }
rand = { workspace = true }
rand_chacha = { workspace = true }
redis = { workspace = true, features = ["ahash", "r2d2", "tokio-comp"] }
regex = { workspace = true }
reqwest = { workspace = true, features = [
"http2",
"json",
"multipart",
"rustls-tls-webpki-roots",
] }
rust_decimal = { workspace = true, features = [
"serde-with-float",
"serde-with-str",
] }
rust_iso3166 = { workspace = true }
rust-s3 = { workspace = true }
rusty-money = { workspace = true }
sentry = { workspace = true }
sentry-actix = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
serde_with = { workspace = true }
sha1 = { workspace = true }
sha2 = { workspace = true }
spdx = { workspace = true, features = ["text"] }
sqlx = { workspace = true, features = [
"chrono",
"json",
"macros",
"migrate",
"postgres",
"runtime-tokio",
"rust_decimal",
"tls-rustls-ring",
] }
tar = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true, features = ["rt-multi-thread", "sync"] }
tokio-stream = { workspace = true }
totp-rs = { workspace = true, features = ["gen_secret"] }
tracing = { workspace = true }
tracing-actix-web = { workspace = true }
tracing-ecs = { workspace = true }
tracing-subscriber = { workspace = true }
url = { workspace = true }
urlencoding = { workspace = true }
uuid = { workspace = true, features = ["fast-rng", "serde", "v4"] }
validator = { workspace = true, features = ["derive"] }
webp = { workspace = true }
woothee = { workspace = true }
yaserde = { workspace = true, features = ["derive"] }
zip = { workspace = true }
zxcvbn = { workspace = true }
[dev-dependencies]
actix-http.workspace = true
actix-http = { workspace = true }
[build-dependencies]
dotenv-build.workspace = true
chrono.workspace = true
iana-time-zone.workspace = true
chrono = { workspace = true }
dotenv-build = { workspace = true }
iana-time-zone = { workspace = true }
[target.'cfg(target_os = "linux")'.dependencies]
jemalloc_pprof = { workspace = true, features = ["flamegraph"] }
tikv-jemalloc-ctl = { workspace = true, features = ["stats"] }
tikv-jemallocator = { workspace = true, features = [
"profiling",
"unprefixed_malloc_on_supported_platforms",
] }
[lints]
workspace = true

View File

@@ -20,7 +20,7 @@ use validator::Validate;
/// A project returned from the API
#[derive(Serialize, Deserialize, Clone)]
pub struct LegacyProject {
/// Relevant V2 fields- these were removed or modfified in V3,
/// Relevant V2 fields- these were removed or modified in V3,
/// and are now part of the dynamic fields system
/// The support range for the client project*
pub client_side: LegacySideType,
@@ -269,7 +269,7 @@ impl std::fmt::Display for LegacySideType {
}
impl LegacySideType {
// These are constant, so this can remove unneccessary allocations (`to_string`)
// These are constant, so this can remove unnecessary allocations (`to_string`)
pub fn as_str(&self) -> &'static str {
match self {
LegacySideType::Required => "required",
@@ -292,7 +292,7 @@ impl LegacySideType {
/// A specific version of a project
#[derive(Serialize, Deserialize, Clone)]
pub struct LegacyVersion {
/// Relevant V2 fields- these were removed or modfified in V3,
/// Relevant V2 fields- these were removed or modified in V3,
/// and are now part of the dynamic fields system
/// A list of game versions this project supports
pub game_versions: Vec<String>,

View File

@@ -22,7 +22,7 @@ pub struct Collection {
/// Color of the collection.
pub color: Option<u32>,
/// The status of the collectin (eg: whether collection is public or not)
/// The status of the collection (eg: whether collection is public or not)
pub status: CollectionStatus,
/// The date at which the collection was first published.

View File

@@ -650,7 +650,7 @@ impl NotificationDeliveryStatus {
NotificationDeliveryStatus::Delivered => Ok(()),
NotificationDeliveryStatus::SkippedPreferences |
NotificationDeliveryStatus::SkippedDefault |
NotificationDeliveryStatus::Pending => Err(ApiError::InvalidInput("An error occured while sending an email to your email address. Please try again later.".to_owned())),
NotificationDeliveryStatus::Pending => Err(ApiError::InvalidInput("An error occurred while sending an email to your email address. Please try again later.".to_owned())),
NotificationDeliveryStatus::PermanentlyFailed => Err(ApiError::InvalidInput("This email address doesn't exist! Please try another one.".to_owned())),
}
}

View File

@@ -20,7 +20,7 @@ pub struct Project {
pub id: ProjectId,
/// The slug of a project, used for vanity URLs
pub slug: Option<String>,
/// The aggregated project typs of the versions of this project
/// The aggregated project typos of the versions of this project
pub project_types: Vec<String>,
/// The aggregated games of the versions of this project
pub games: Vec<String>,
@@ -49,7 +49,7 @@ pub struct Project {
/// The status of the project
pub status: ProjectStatus,
/// The requested status of this projct
/// The requested status of this project
pub requested_status: Option<ProjectStatus>,
/// DEPRECATED: moved to threads system

View File

@@ -65,7 +65,7 @@ impl std::fmt::Display for ThreadType {
}
impl ThreadType {
// These are constant, so this can remove unneccessary allocations (`to_string`)
// These are constant, so this can remove unnecessary allocations (`to_string`)
pub fn as_str(&self) -> &'static str {
match self {
ThreadType::Report => "report",

View File

@@ -502,7 +502,7 @@ async fn update_anrok_transactions(
/// Attempts to process a user redeemal.
///
/// Returns `Ok` if the entry has been succesfully processed, or will not be processed.
/// Returns `Ok` if the entry has been successfully processed, or will not be processed.
pub async fn try_process_user_redeemal(
pool: &PgPool,
redis: &RedisPool,

View File

@@ -75,7 +75,7 @@ pub enum AttachedCharge {
/// This can be used in the case of resubscription flows. The amount from this
/// charge will be used, but the tax will be recalculated and the charge updated.
///
/// The charge's status will NOT be updated - it is the caller's responsability to
/// The charge's status will NOT be updated - it is the caller's responsibility to
/// update the charge's status on failure or success.
///
/// This may be accompanied by an automated payment session.
@@ -160,7 +160,7 @@ pub struct PaymentBootstrapOptions<'a> {
///
/// Taxes will always be collected.
///
/// Note the charge will NOT be updated. It is the caller's responsability to update the charge
/// Note the charge will NOT be updated. It is the caller's responsibility to update the charge
/// on success or failure.
pub payment_session: PaymentSession,
/// The charge the payment intent on should be based upon.
@@ -185,7 +185,7 @@ pub struct PaymentBootstrapResults {
///
/// # Important notes
///
/// - This function does not perform any database writes. It is the caller's responsability to, for
/// - This function does not perform any database writes. It is the caller's responsibility to, for
/// example, update the charge's status on success or failure, or update the charge's tax amount,
/// tax eligibility or payment and tax platform IDs.
/// - You may not update or create a payment intent for an off-session payment flow without

View File

@@ -1,4 +1,4 @@
//! TODO: this module should be removed; it is superceded by `analytics_get`
//! TODO: this module should be removed; it is superseded by `analytics_get`
use super::ApiError;
use crate::database;
@@ -412,7 +412,7 @@ pub async fn revenue_get(
/// Get country data for a set of projects or versions
/// Data is returned as a hashmap of project/version ids to a hashmap of coutnry to downloads.
/// Unknown countries are labeled "".
/// This is usuable to see significant performing countries per project
/// This is usable to see significant performing countries per project
/// eg:
/// {
/// "4N1tEhnO": {
@@ -485,7 +485,7 @@ pub async fn countries_downloads_get(
/// Get country data for a set of projects or versions
/// Data is returned as a hashmap of project/version ids to a hashmap of coutnry to views.
/// Unknown countries are labeled "".
/// This is usuable to see significant performing countries per project
/// This is usable to see significant performing countries per project
/// eg:
/// {
/// "4N1tEhnO": {

View File

@@ -355,7 +355,7 @@ pub async fn index_local(
}
// SPECIAL BEHAVIOUR:
// For consitency with v2 searching, we manually input the
// For consistency with v2 searching, we manually input the
// client_side and server_side fields from the loader fields into
// separate loader fields.
// 'client_side' and 'server_side' remain supported by meilisearch even though they are no longer v3 fields.

View File

@@ -33,7 +33,7 @@ pub struct FormResponse {
pub company_name: String,
pub company_email: String,
pub reference_id: String,
/// This is a DateTime, but it's not consistent wether it has a
/// This is a DateTime, but it's not consistent whether it has a
/// timezone or not, so we just parse it as a string and use [`Utc::now()`](fn@chrono::Utc::now)
/// rather than using the provided DateTime.
pub signed_at: Option<String>,

View File

@@ -198,7 +198,7 @@ pub async fn delete_old_images(
// check changes to associated images
// if they no longer exist in the String list, delete them
// Eg: if description is modified and no longer contains a link to an iamge
// Eg: if description is modified and no longer contains a link to an image
pub async fn delete_unused_images(
context: ImageContext,
reference_strings: Vec<&str>,

View File

@@ -129,7 +129,7 @@ impl ApiVersion for ApiV3 {
modify_json,
);
// Add a versiom.
// Add a version.
let req = TestRequest::post()
.uri("/v3/version")
.append_pat(pat)

View File

@@ -59,7 +59,7 @@ impl TemporaryDatabase {
let database_url =
dotenvy::var("DATABASE_URL").expect("No database URL");
// Create the temporary (and template datbase, if needed)
// Create the temporary (and template database, if needed)
Self::create_temporary(&database_url, &temp_database_name).await;
// Pool to the temporary database
@@ -102,7 +102,7 @@ impl TemporaryDatabase {
}
}
// Creates a template and temporary databse (panics)
// Creates a template and temporary database (panics)
// 1. Waits to obtain a pg lock on the main database
// 2. Creates a new template database called 'TEMPLATE_DATABASE_NAME', if needed
// 3. Switches to the template database

View File

@@ -390,7 +390,7 @@ pub async fn add_project_beta(api: &ApiV3) -> (Project, Version) {
}
pub async fn add_organization_zeta(api: &ApiV3) -> Organization {
// Add an organzation.
// Add an organization.
let req = TestRequest::post()
.uri("/v3/organization")
.append_pat(USER_USER_PAT)

View File

@@ -35,7 +35,7 @@ pub struct PermissionsTest<'a, A: Api> {
user_pat: Option<&'a str>,
// Whether or not the user ID should be removed from the project/organization team after the test
// (This is mostly reelvant if you are also using an existing project/organization, and want to do
// (This is mostly relevant if you are also using an existing project/organization, and want to do
// multiple tests with the same user.
remove_user: bool,
@@ -1056,10 +1056,10 @@ async fn create_dummy_org(setup_api: &ApiV3) -> (String, String) {
let organization = setup_api
.get_organization_deserialized(&slug, ADMIN_USER_PAT)
.await;
let organizaion_id = organization.id.to_string();
let organization_id = organization.id.to_string();
let team_id = organization.team_id.to_string();
(organizaion_id, team_id)
(organization_id, team_id)
}
async fn add_project_to_org(

View File

@@ -61,7 +61,7 @@ pub async fn pat_full_test() {
let mock_pat_test = |token: &str| {
let token = token.to_string();
async {
// This uses a route directly instead of an api call because it doesn't relaly matter and we
// This uses a route directly instead of an api call because it doesn't really matter and we
// want it to succeed no matter what.
// This is an arbitrary request.
let req = test::TestRequest::post()

View File

@@ -419,7 +419,7 @@ pub async fn test_patch_project() {
.await;
assert_status!(&resp, StatusCode::UNAUTHORIZED);
// Sucessful request to patch many fields.
// Successful request to patch many fields.
let resp = api
.edit_project(
alpha_project_slug,
@@ -500,7 +500,7 @@ pub async fn test_patch_v3() {
let alpha_project_slug = &test_env.dummy.project_alpha.project_slug;
// Sucessful request to patch many fields.
// Successful request to patch many fields.
let resp = api
.edit_project(
alpha_project_slug,
@@ -1141,7 +1141,7 @@ async fn permissions_delete_project() {
async fn project_permissions_consistency_test() {
with_test_environment_all(Some(10), |test_env| async move {
// Test that the permissions are consistent with each other
// For example, if we get the projectpermissions directly, from an organization's defaults, overriden, etc, they should all be correct & consistent
// For example, if we get the projectpermissions directly, from an organization's defaults, overridden, etc, they should all be correct & consistent
let api = &test_env.api;
// Full project permissions test with EDIT_DETAILS
let success_permissions = ProjectPermissions::EDIT_DETAILS;

View File

@@ -535,7 +535,7 @@ async fn test_patch_organization_team_member() {
}).await;
}
// trasnfer ownership (requires being owner, etc)
// transfer ownership (requires being owner, etc)
#[actix_rt::test]
async fn transfer_ownership_v3() {
// Test setup and dummy data
@@ -675,7 +675,7 @@ async fn transfer_ownership_v3() {
// // Adding a user to a project team in an organization, when that user is in the organization but not the team,
// // should have those permissions apply regardless of whether the user has accepted the invite or not.
// // This is because project-team permission overrriding must be possible, and this overriding can decrease the number of permissions a user has.
// // This is because project-team permission overriding must be possible, and this overriding can decrease the number of permissions a user has.
// let test_env = TestEnvironment::build(None).await;
// let api = &test_env.api;

View File

@@ -103,7 +103,7 @@ async fn test_project_type_sanity() {
);
}
// As we get more complicated strucures with as v3 continues to expand, and alpha/beta get more complicated, we should add more tests here,
// As we get more complicated structures with as v3 continues to expand, and alpha/beta get more complicated, we should add more tests here,
// to ensure that projects created with v3 routes are still valid and work with v3 routes.
},
)
@@ -413,7 +413,7 @@ pub async fn test_patch_v2() {
let alpha_project_slug = &test_env.dummy.project_alpha.project_slug;
// Sucessful request to patch many fields.
// Successful request to patch many fields.
let resp = api
.edit_project(
alpha_project_slug,
@@ -433,7 +433,7 @@ pub async fn test_patch_v2() {
// Note: the original V2 value of this was "optional",
// but Required/Optional is no longer a carried combination in v3, as the changes made were lossy.
// Now, the test Required/Unsupported combination is tested instead.
// Setting Required/Optional in v2 will not work, this is known and accepteed.
// Setting Required/Optional in v2 will not work, this is known and accepted.
assert_eq!(project.client_side.as_str(), "unsupported");
assert_eq!(project.server_side.as_str(), "required");
},

View File

@@ -15,7 +15,7 @@ use crate::{
},
};
// trasnfer ownership (requires being owner, etc)
// transfer ownership (requires being owner, etc)
#[actix_rt::test]
async fn transfer_ownership_v2() {
// Test setup and dummy data

View File

@@ -56,7 +56,7 @@ pub async fn test_patch_version() {
assert_status!(&resp, StatusCode::BAD_REQUEST);
}
// Sucessful request to patch many fields.
// Successful request to patch many fields.
let resp = api
.edit_version(
alpha_version_id,

View File

@@ -3,7 +3,7 @@ pub mod common;
// Not all tests expect exactly the same functionality in v2 and v3.
// For example, though we expect the /GET version to return the corresponding project,
// we may want to do different checks for each.
// (such as checking client_side in v2, but loader fields on v3- which are model-exclusie)
// (such as checking client_side in v2, but loader fields on v3- which are model-exclusive)
// Such V2 tests are exported here
mod v2 {

View File

@@ -439,7 +439,7 @@ pub async fn test_patch_version() {
assert_status!(&resp, StatusCode::BAD_REQUEST);
}
// Sucessful request to patch many fields.
// Successful request to patch many fields.
let resp = api
.edit_version(
alpha_version_id,