refactor(deprecate): complete removal of legacy subcommands#30
Merged
Conversation
Remove type definitions that are only used by deprecated create-database, create-user, and update-user commands. These include DatabaseParams, SingleDBParams, GrantDBParams, CreateUserParams, CreateUserRouteParams, CreateSingleDBResult, CreateGrantResult, and CreateDatabaseResult. Also remove unused imports (Either, IO, Array, Option) after deletion of their dependent code. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Delete test functions for deprecated create-user, update-user, and create-database commands from user_test.go, database_test.go, and logger_test.go. These tests are no longer relevant as the legacy handlers and functions have been removed. Removed tests: - user_test.go: TestCreateUser, TestUpdateUser, TestCreateUserPipelineNewUser, TestCreateUserPipelineIdempotent, TestUpdateUserPipelineSuccess, TestUpdateUserPipelineNonExistent - database_test.go: TestCreateDatabase, TestCreateDatabaseWithUser, TestCreateSingleDatabaseNew, TestCreateSingleDatabaseIdempotent, TestGrantSingleDatabase, TestGrantSingleDatabaseFailure, TestCreateDatabasePipelineWithUser, TestCreateUserAndGrantErrors - logger_test.go: TestLogCreateUserOutcomeIncludesStatus, TestLogUserUpdatedIncludesStatus, TestLogCreateDatabaseOutcomeIncludesStatuses Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Delete WithClient, UserParams, and UserForUpdate structs that were only used by the removed legacy commands. Remove the mockClient test helper that was only used by the deleted TestCreateUserAndGrantErrors test. Clean up unused imports across database_test.go, user_test.go, and types.go introduced by the legacy code deletions. Migrate TestConnectionFailure from create-user to ensure-user command to preserve the connection error coverage without the legacy command. Remove TestCreateUserAuthFailure which tested the deleted create-user command. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
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.
Complete the deprecation of legacy ArangoDB CLI subcommands (create-user, update-user, create-database) that are now superseded by ensure-user, ensure-database, and ensure-grant.
Changes
Phase 1-4: Completed in previous commits
Phase 5: Final cleanup of orphaned types and imports
WithClientandUserParamsstructs (unused after legacy command removal), removedlog/slogimportUserForUpdatestruct, added back accidental cli/v3 import removallog/slog,os,github.com/IBM/fp-go/v2/either), migratedTestConnectionFailureto useensureUserCommand()fmt,log/slog,os,github.com/IBM/fp-go/v2/either,require), deletedmockClientstructVerification
✅ All 21 tests pass
✅ Zero linting issues
✅ Build succeeds
✅ All legacy command references removed