~jcsackett/charmworld/bac-tag-constraints

« back to all changes in this revision

Viewing changes to charmworld/migrations/versions/tests/test_migrations.py

  • Committer: Tarmac
  • Author(s): Brad Crittenden
  • Date: 2013-08-23 22:01:47 UTC
  • mfrom: (358.1.14 official-bundle-json)
  • Revision ID: tarmac-20130823220147-z0pg084iaro0afyh
[r=sinzui][bug=1215473][author=bac] Support official/promulgated bundles.  Change bundle to store basket_name and basket_revision separately rather than as on combined basket_id with name/rev.  Always use 'bundles' in the path for web and api requests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
299
299
        parsed = yaml.safe_load(deployer_config)
300
300
        owner = 'owner'
301
301
        bundle_name = 'wordpress-stage'
302
 
        basket_id = 'wordpress-basket/5'
303
 
        self.search_id = Bundle.construct_search_id(
304
 
            owner, basket_id, bundle_name)
305
 
        store_bundles(self.db.bundles, parsed, owner, basket_id, 
 
302
        basket_name = 'wordpress-basket'
 
303
        basket_rev = 3
 
304
        basket_id = "%s/%d" % (basket_name, basket_rev)
 
305
        self.search_id = Bundle.construct_id(
 
306
            owner, basket_name, bundle_name)
 
307
        store_bundles(self.db.bundles, parsed, owner, basket_id,
306
308
            index_client=self.index_client)
307
309
 
308
310
    def test_bundles_are_removed_from_elastic_search(self):