Migrate ActiveItem tests from Stowzilla#2
Merged
Conversation
Migrates the following test coverage from the Stowzilla app into the ActiveItem gem: - batch_find_spec: batch_find with chunking and persisted records - batch_find_unprocessed_keys_spec: retry logic with exponential backoff - batch_write_spec: batch_write with chunking, timestamps, no callbacks - callback_on_option_spec: before_save/after_save with on: :create/:update - composed_of_spec: value object reader/writer/persistence - explain_spec: Relation#explain for query/scan introspection - includes_spec: preloading belongs_to and has_many :count - parallel_preload_spec: threaded count preloading - relation_load_spec: Relation#load for full hydration - relation_order_spec: Relation#order with scan_index_forward - select_spec: Relation#select projection expression - uniqueness_validator_spec: uniqueness validation with scope Also fixes FakeDynamoClient#query to return count field for SELECT COUNT queries used by the preloading system. Closes #842
- Add docker-compose.yml for amazon/dynamodb-local - Add spec/support/dynamodb_local_helper.rb for table lifecycle - Rewrite all specs to use real Aws::DynamoDB::Client against localhost:8000 - Tests now verify actual put/get/query/scan against a real DynamoDB engine - 110 examples, 0 failures
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.
Migrates test coverage from the Stowzilla app's
spec/models/dynamo_record/into the ActiveItem gem.New specs (12 files, 111 total examples)
before_save on: :create/:updateRelation#explainintrospectionRelation#loadfull hydrationRelation#orderwith scan_index_forwardRelation#selectprojection expressionAlso fixes
FakeDynamoClient#queryto returncountfield forSELECT COUNTqueries.Fizzy #842