@@ -228,6 +228,19 @@ def test_load_repos_limit(self):
228228 self .assertEqual (1 , len (got ))
229229 self .assertEqual ('did:plc:bob' , got [0 ].did )
230230
231+ def test_load_repos_minimal (self ):
232+ alice = Repo .create (self .storage , 'did:web:alice' , signing_key = self .key )
233+ bob = Repo .create (self .storage , 'did:plc:bob' , signing_key = self .key )
234+ self .storage .tombstone_repo (bob )
235+
236+ got_bob , got_alice = self .storage .load_repos (minimal = True )
237+
238+ self .assertEqual (alice .head , got_alice .head )
239+ self .assertIsNone (got_alice .status )
240+
241+ self .assertEqual (bob .head , got_bob .head )
242+ self .assertEqual ('tombstoned' , got_bob .status )
243+
231244 def test_tombstone_repo (self ):
232245 seen = []
233246 repo = Repo .create (self .storage , 'did:user' , signing_key = self .key )
@@ -500,6 +513,15 @@ def test_commit_callback(self):
500513
501514class DatastoreStorageTest (StorageTest , DatastoreTest ):
502515 """Run all of StorageTest's tests with DatastoreStorage."""
516+ def test_load_repos_minimal_skips_keys_and_mst (self ):
517+ Repo .create (self .storage , 'did:web:alice' , signing_key = self .key )
518+
519+ got = self .storage .load_repos (minimal = True )
520+ self .assertEqual (1 , len (got ))
521+ self .assertIsNone (got [0 ].signing_key )
522+ self .assertIsNone (got [0 ].rotation_key )
523+ self .assertIsNone (got [0 ].mst )
524+
503525 def test_create_commit_datastore_transaction_retry (self ):
504526 # fake what a Repo.create => Storage.commit retry due to datastore transaction
505527 # contention would look like.
0 commit comments