test(storage): verify v11 storage compatibility with binary fixtures - #117
Open
ncooke3 wants to merge 5 commits into
Open
test(storage): verify v11 storage compatibility with binary fixtures#117ncooke3 wants to merge 5 commits into
ncooke3 wants to merge 5 commits into
Conversation
Document internal testing scope for UserDefaults keys and suite names, ensure hermetic cleanup in AppAttestKeyIDStorageTests, and add behavioral regression test verifying registered debug token key formatting and write-back.
…tests Extract legacy Objective-C models from tag 11.0.0 via tools/generate_storage_fixtures.sh, commit serialized binary fixtures for GACAppCheckStoredToken and GACAppAttestStoredArtifact, and add unit tests verifying NSSecureCoding unarchiving and Keychain service contracts.
Add -h/--help documentation to generate_storage_fixtures.sh and validate that supplied Git tags exist and contain legacy Objective-C models.
Assert that missing properties return nil for cache miss self-healing, test programmatic corrupted payload handling, and verify runtime class names and property types for downgrade safety.
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
Ensure full data persistence backward compatibility between App Check 11.x (Objective-C) and App Check 12 (Swift port on
pb-swift).Changes
UserDefaults Compatibility:
GACAppCheckDebugTokenRegistered_<service>_<resource>registration check and write-back inAppCheckCoreDebugProvider.AppCheckCoreAppAttestKeyIDStorageTests.testLegacyRegisteredDebugTokenCompatibility.Keychain Storage Compatibility:
bplist00) fixtures using historical Objective-C models compiled viaclangwithout runtime symbol collision:GACAppCheckStoredToken.bin(468 bytes)GACAppAttestStoredArtifact.bin(457 bytes)@objc(...)class declarations inAppCheckCoreStoredTokenandAppCheckCoreAppAttestStoredArtifact.keychainServicecontract constants onAppCheckCoreStorage("com.google.app_check_core.token_storage") andAppCheckCoreAppAttestArtifactStorage("com.firebase.app_check.app_attest_artifact_storage").AppCheckCoreStoredTokenTestsandAppCheckCoreAppAttestStoredArtifactTests.Test Infrastructure & Tooling:
Bundle.module.tools/generate_storage_fixtures.shwith-h/--helpdocumentation and Git ref validation. Validated withshellcheck(0 warnings).Fixture Footprint
These immutable binary fixtures represent frozen serialization contracts and add negligible disk overhead:
GACAppAttestStoredArtifact.bin: 457 bytes (~0.45 KB)GACAppCheckStoredToken.bin: 468 bytes (~0.47 KB)AppCheckCore: 2.2 KB to 6.8 KB (fixtures are 5x to 15x smaller than individual source files)Verification
swift test: 136 tests passed, 0 failures.shellcheck tools/generate_storage_fixtures.sh: 0 warnings.scripts/style.sh.