Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
Tests v2 recreate (#760)
Browse files Browse the repository at this point in the history
* added common project information; setup for v2 test change

* all tests now use with_test_environment

* progress, failing

* finished re-adding tests

* prepare

* cargo sqlx prepare -- --tests

* fmt; clippy; prepare

* sqlx prepare

* adds version_create fix and corresponding test

* merge fixes; rev

* fmt, clippy, prepare

* test cargo sqlx prepare
  • Loading branch information
thesuzerain authored Nov 25, 2023
1 parent 9886ff1 commit 945935f
Show file tree
Hide file tree
Showing 51 changed files with 7,604 additions and 6,662 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ derive-new = "0.5.9"

[dev-dependencies]
actix-http = "3.4.0"

json-patch = "*"
[profile.dev]
opt-level = 0 # Minimal optimization, speeds up compilation
lto = false # Disables Link Time Optimization
Expand Down
6 changes: 4 additions & 2 deletions src/models/v2/projects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,12 @@ pub struct LegacyVersion {
/// and are now part of the dynamic fields system
/// A list of game versions this project supports
pub game_versions: Vec<String>,
/// A list of loaders this project supports

/// A list of loaders this project supports (has a newtype struct)
pub loaders: Vec<Loader>,

// TODO: remove this once we have v3 testing, as this is a v3 field and tests for it should be isolated to v3
// TODO: should we remove this? as this is a v3 field and tests for it should be isolated to v3
// it allows us to keep tests that use this struct in common
pub ordering: Option<i32>,

pub id: VersionId,
Expand Down
2 changes: 1 addition & 1 deletion src/routes/v2/version_creation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ pub async fn version_create(
for file_part in &legacy_create.file_parts {
if let Some(ext) = file_part.split('.').last() {
match ext {
"mrpack" => {
"mrpack" | "mrpack-primary" => {
project_type = Some("modpack");
break;
}
Expand Down
1 change: 0 additions & 1 deletion src/routes/v3/project_creation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,6 @@ async fn create_initial_version(
&mut loader_field_enum_values,
)?;

println!("Made it past here");
let dependencies = version_data
.dependencies
.iter()
Expand Down
Loading

0 comments on commit 945935f

Please sign in to comment.