Repository navigation
Fix object_field_type_validation_test.rs after the collection field rename - #2462
Merged
Merged
Conversation
…ename CreateNodeInput.collection and UpdateNodeInput.add_to_collection/ remove_from_collection were renamed to collections/collection_ids and add_to_collections/add_to_collection_ids/remove_from_collection_ids (the --collection flag work), but this test file still used the old field names and shapes -- main did not compile with --all-targets. Co-Authored-By: Claude <[email protected]>
Contributor
Author
|
Quick review: mechanical field-rename fix, verified the new field names ( |
15 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
origin/maincurrently fails to compile with--all-targets:packages/core/tests/object_field_type_validation_test.rsstill used the pre-rename field names/shapes forCreateNodeInput/UpdateNodeInput.PR #2450 renamed:
CreateNodeInput.collection: Option<String>→collections: Vec<String>+collection_ids: Vec<String>UpdateNodeInput.add_to_collection/remove_from_collection→add_to_collections: Vec<String>+add_to_collection_ids: Vec<String>+remove_from_collection_ids: Vec<String>PR #2458 (which added
object_field_type_validation_test.rs) landed on top of #2450 without picking up that rename, so the test file uses the old field names —cargo test --workspace --tests(part of the standard pre-push gate) fails to compile for anyone touchingpackages/core, whether or not their change has anything to do with collections.Found this mid-rebase on an unrelated branch; not something I introduced. Fixing it standalone since it's currently blocking every push that runs the full test suite.
Changes
Purely mechanical: update the 5 struct-literal sites in the test file to the current field names/shapes (
None→vec![]where the field type also changed fromOption<...>to a plainVec<...>). No behavior change to the test file's actual assertions.Test plan
cargo test -p nodespace-core --test object_field_type_validation_test— all 13 tests passcargo check -p nodespace-core --all-targets— compiles clean🤖 Generated with Claude Code
Co-Authored-By: Claude [email protected]