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>
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
Low risk: adds new unit tests only, with no production code changes; risk is limited to potential test brittleness around URL normalization expectations.
Overview
Adds
StorageCompatTeststo validate the C# SDK’s storage integration against storage-service response shapes.The tests cover
RetrieveBlob.Urlhandling ofindico-file://and quoted URIs,StorageClient.DeserializeMetadatamapping ofpath/name/size/upload_type(including enum deserialization), and theUploadAsyncJSON(Name, Meta)extraction pattern.Reviewed by Cursor Bugbot for commit bb9e6b7. Bugbot is set up for automated code reviews on this repo. Configure here.