DEV-14972: C# SDK storage-service compatibility unit tests#163
Open
DEV-14972: C# SDK storage-service compatibility unit tests#163
Conversation
…ce response shapes Audit confirms no client patches needed: - DeserializeMetadata: path/name/upload_type/size map correctly from storage-service LegacyUploadResponseItem (SnakeCaseNamingStrategy + enum name matching handles "user" -> UploadType.User) - RetrieveBlob.Url: indico-file:// path extraction works; double-slash is pre-existing behaviour nginx normalises - JToken name/meta extraction pattern works on storage-service response Tests use NUnit + FluentAssertions, no network required. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Total Coverage: 0.00% Coverage Report
|
|
Total Coverage: 0.00% Coverage Report
|
jacobmanderson
approved these changes
Apr 23, 2026
jacobmanderson
left a comment
There was a problem hiding this comment.
No blocking findings. This is test-only coverage for the storage-service compatibility paths, and the current build/checks are green.
- Jacob's AI Assistant
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
DeserializeMetadatamapspath/name/upload_type/sizecorrectly viaSnakeCaseNamingStrategy;UploadType.Userdeserializes correctly from"user"string;RetrieveBlob.Urlextracts correct paths fromindico-file://URIsRetrieveBlob.Urlproduces a double-slash (//storage/...) due toUri.ToString()adding a trailing slash — pre-existing behavior that nginx normalises; no fix needed for the migrationTest plan
RetrieveBlob_Url_ExtractsPath_FromIndicoFileSchemeUri—indico-file:///storage/...path extractionRetrieveBlob_Url_ExtractsPath_FromHttpUri— plain https URI passthroughRetrieveBlob_Url_StripsSurroundingQuotes— GraphQL quoted URI handlingDeserializeMetadata_MapsPathAndName_FromStorageServiceResponse— field mappingDeserializeMetadata_MapsSize_FromStorageServiceResponse— size fieldDeserializeMetadata_MapsUploadType_UserStringToEnum—"user"→UploadType.UserDeserializeMetadata_HandlesMultipleFiles— multi-file batchUploadAsync_NameMetaExtraction_ReadsNameFromStorageServiceItem— name/meta tuple patternAll 8 tests pass. No network required.
Part of DEV-14699 storage-service migration epic.
🤖 Generated with Claude Code
Note
Low Risk
Adds only new unit tests; no production code changes. Risk is limited to potential test flakiness due to local
HttpListenernetworking and redirect/token refresh assumptions.Overview
Adds a new storage-focused test suite to validate the C# SDK remains compatible with storage-service response shapes and URI formats, including
RetrieveBlob.Urlhandling ofindico-file://URLs andStorageClient.DeserializeMetadatamapping of upload metadata fields.Adds HTTP behavior tests that simulate a local server to verify the SDK retries after a 401 by refreshing the token, and that cross-host redirects are followed without forwarding the
Authorizationheader.Reviewed by Cursor Bugbot for commit cef55d2. Bugbot is set up for automated code reviews on this repo. Configure here.