diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a2dae4a..e76ba02 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,10 +3,13 @@ Changelog This document describes changes between each past release. -3.1.0 (unreleased) +4.0.0 (unreleased) ------------------ -- Nothing changed yet. +**Breaking changes** + +- ``kinto-wizard load`` now expects to find a ``buckets:`` root level in the YAML file. + And ``kinto-wizard dump`` will now add it (fixes #59) 3.0.0 (2018-10-17) diff --git a/kinto_wizard/kinto2yaml.py b/kinto_wizard/kinto2yaml.py index ecb70ce..9f74635 100644 --- a/kinto_wizard/kinto2yaml.py +++ b/kinto_wizard/kinto2yaml.py @@ -30,16 +30,17 @@ async def introspect_server(client, bucket=None, collection=None, data=False, re bucket_info = await introspect_bucket(client, bucket, collection=collection, data=data, records=records) if bucket_info: - return {bucket: bucket_info} - return {} + return {"buckets": {bucket: bucket_info}} + return {"buckets": {}} logger.info("Fetch buckets list.") buckets = await client.get_buckets() - return await gather_dict({ + buckets_tree = await gather_dict({ bucket['id']: introspect_bucket(client, bucket['id'], collection=collection, data=data, records=records) for bucket in buckets }) + return {"buckets": buckets_tree} async def introspect_bucket(client, bid, collection=None, data=False, records=False): diff --git a/kinto_wizard/yaml2kinto.py b/kinto_wizard/yaml2kinto.py index aacbcf0..8d580e2 100644 --- a/kinto_wizard/yaml2kinto.py +++ b/kinto_wizard/yaml2kinto.py @@ -16,17 +16,19 @@ async def initialize_server(async_client, config, bucket=None, collection=None, collection=collection, records=True ) + current_server_buckets = current_server_status["buckets"] else: # We don't need to load it because we will override it nevertheless. - current_server_status = {} + current_server_buckets = {} # 2. For each bucket + buckets = config.get("buckets", {}) with async_client.batch() as batch: - for bucket_id, bucket in config.items(): + for bucket_id, bucket in buckets.items(): # Skip buckets that we don't want to import. if bid and bucket_id != bid: logger.debug("Skip bucket {}".format(bucket_id)) continue - bucket_exists = bucket_id in current_server_status + bucket_exists = bucket_id in current_server_buckets bucket_data = bucket.get('data', {}) bucket_permissions = bucket.get('permissions', {}) bucket_groups = bucket.get('groups', {}) @@ -47,7 +49,7 @@ async def initialize_server(async_client, config, bucket=None, collection=None, permissions=bucket_permissions, safe=(not force)) else: - current_bucket = current_server_status[bucket_id] + current_bucket = current_server_buckets[bucket_id] bucket_current_groups = {} bucket_current_collections = {} current_bucket_data = {} diff --git a/tests/dumps/dump-date.yaml b/tests/dumps/dump-date.yaml index f166ded..a405720 100644 --- a/tests/dumps/dump-date.yaml +++ b/tests/dumps/dump-date.yaml @@ -1,19 +1,20 @@ -date: - collections: - dates: - data: - created_at: '2018-06-22T16:34:43.330907' - id: dates - last_modified: 1496132464691 - published_date: '2018-06-22' - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 - records: {} - data: - id: date - last_modified: 1529681414530 - groups: {} - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 +buckets: + date: + collections: + dates: + data: + created_at: '2018-06-22T16:34:43.330907' + id: dates + last_modified: 1496132464691 + published_date: '2018-06-22' + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 + records: {} + data: + id: date + last_modified: 1529681414530 + groups: {} + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 diff --git a/tests/dumps/dump-full.yaml b/tests/dumps/dump-full.yaml index d05d598..b2edf42 100644 --- a/tests/dumps/dump-full.yaml +++ b/tests/dumps/dump-full.yaml @@ -1,71 +1,72 @@ -natim: - collections: - toto: - data: - id: toto - last_modified: 1496132464691 - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 - records: - e2686bac-c45e-4144-9738-edfeb3d9da6d: - data: - id: e2686bac-c45e-4144-9738-edfeb3d9da6d - last_modified: 1496132479127 - permissions: {} - data: - id: natim - last_modified: 1496132446213 - groups: {} - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 -natim2: - collections: - toto: - data: - id: toto - last_modified: 1496132461211 - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 - records: - ee338fcd-3a19-4a4f-af05-a8b052a23521: - data: - id: ee338fcd-3a19-4a4f-af05-a8b052a23521 - last_modified: 1496132482950 - permissions: {} - totot: - data: - id: totot - last_modified: 1496132458576 - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 - records: {} - data: - id: natim2 - last_modified: 1496132453519 - groups: {} - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 -date: - collections: - dates: - data: - id: dates - last_modified: 1496132464691 - published_date: 2018-06-22 - created_at: 2018-06-22 16:34:43.330907 - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 - records: {} - data: - id: date - last_modified: 1529681414530 - groups: {} - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 +buckets: + natim: + collections: + toto: + data: + id: toto + last_modified: 1496132464691 + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 + records: + e2686bac-c45e-4144-9738-edfeb3d9da6d: + data: + id: e2686bac-c45e-4144-9738-edfeb3d9da6d + last_modified: 1496132479127 + permissions: {} + data: + id: natim + last_modified: 1496132446213 + groups: {} + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 + natim2: + collections: + toto: + data: + id: toto + last_modified: 1496132461211 + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 + records: + ee338fcd-3a19-4a4f-af05-a8b052a23521: + data: + id: ee338fcd-3a19-4a4f-af05-a8b052a23521 + last_modified: 1496132482950 + permissions: {} + totot: + data: + id: totot + last_modified: 1496132458576 + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 + records: {} + data: + id: natim2 + last_modified: 1496132453519 + groups: {} + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 + date: + collections: + dates: + data: + id: dates + last_modified: 1496132464691 + published_date: 2018-06-22 + created_at: 2018-06-22 16:34:43.330907 + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 + records: {} + data: + id: date + last_modified: 1529681414530 + groups: {} + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 diff --git a/tests/dumps/dump-natim-toto-groups.yaml b/tests/dumps/dump-natim-toto-groups.yaml index 1cec68b..9c1acaf 100644 --- a/tests/dumps/dump-natim-toto-groups.yaml +++ b/tests/dumps/dump-natim-toto-groups.yaml @@ -1,22 +1,23 @@ -natim: - collections: - toto: - data: - id: toto - last_modified: 1496132464691 - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 - records: - e2686bac-c45e-4144-9738-edfeb3d9da6d: - data: - id: e2686bac-c45e-4144-9738-edfeb3d9da6d - last_modified: 1496132479127 - permissions: {} - data: - id: natim - last_modified: 1496132446213 - groups: {} - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 +buckets: + natim: + collections: + toto: + data: + id: toto + last_modified: 1496132464691 + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 + records: + e2686bac-c45e-4144-9738-edfeb3d9da6d: + data: + id: e2686bac-c45e-4144-9738-edfeb3d9da6d + last_modified: 1496132479127 + permissions: {} + data: + id: natim + last_modified: 1496132446213 + groups: {} + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 diff --git a/tests/dumps/dump-natim-toto.yaml b/tests/dumps/dump-natim-toto.yaml index 1b1af8a..f775ac0 100644 --- a/tests/dumps/dump-natim-toto.yaml +++ b/tests/dumps/dump-natim-toto.yaml @@ -1,21 +1,22 @@ -natim: - collections: - toto: - data: - id: toto - last_modified: 1496132464691 - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 - records: - e2686bac-c45e-4144-9738-edfeb3d9da6d: - data: - id: e2686bac-c45e-4144-9738-edfeb3d9da6d - last_modified: 1496132479127 - permissions: {} - data: - id: natim - last_modified: 1496132446213 - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 +buckets: + natim: + collections: + toto: + data: + id: toto + last_modified: 1496132464691 + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 + records: + e2686bac-c45e-4144-9738-edfeb3d9da6d: + data: + id: e2686bac-c45e-4144-9738-edfeb3d9da6d + last_modified: 1496132479127 + permissions: {} + data: + id: natim + last_modified: 1496132446213 + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 diff --git a/tests/dumps/dump-natim.yaml b/tests/dumps/dump-natim.yaml index 1cec68b..9c1acaf 100644 --- a/tests/dumps/dump-natim.yaml +++ b/tests/dumps/dump-natim.yaml @@ -1,22 +1,23 @@ -natim: - collections: - toto: - data: - id: toto - last_modified: 1496132464691 - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 - records: - e2686bac-c45e-4144-9738-edfeb3d9da6d: - data: - id: e2686bac-c45e-4144-9738-edfeb3d9da6d - last_modified: 1496132479127 - permissions: {} - data: - id: natim - last_modified: 1496132446213 - groups: {} - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 +buckets: + natim: + collections: + toto: + data: + id: toto + last_modified: 1496132464691 + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 + records: + e2686bac-c45e-4144-9738-edfeb3d9da6d: + data: + id: e2686bac-c45e-4144-9738-edfeb3d9da6d + last_modified: 1496132479127 + permissions: {} + data: + id: natim + last_modified: 1496132446213 + groups: {} + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 diff --git a/tests/dumps/dump-toto-groups.yaml b/tests/dumps/dump-toto-groups.yaml index fa29718..57f7fb0 100644 --- a/tests/dumps/dump-toto-groups.yaml +++ b/tests/dumps/dump-toto-groups.yaml @@ -1,44 +1,45 @@ -natim: - collections: - toto: - data: - id: toto - last_modified: 1496132464691 - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 - records: - e2686bac-c45e-4144-9738-edfeb3d9da6d: - data: - id: e2686bac-c45e-4144-9738-edfeb3d9da6d - last_modified: 1496132479127 - permissions: {} - data: - id: natim - last_modified: 1496132446213 - groups: {} - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 -natim2: - collections: - toto: - data: - id: toto - last_modified: 1496132461211 - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 - records: - ee338fcd-3a19-4a4f-af05-a8b052a23521: - data: - id: ee338fcd-3a19-4a4f-af05-a8b052a23521 - last_modified: 1496132482950 - permissions: {} - data: - id: natim2 - last_modified: 1496132453519 - groups: {} - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 +buckets: + natim: + collections: + toto: + data: + id: toto + last_modified: 1496132464691 + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 + records: + e2686bac-c45e-4144-9738-edfeb3d9da6d: + data: + id: e2686bac-c45e-4144-9738-edfeb3d9da6d + last_modified: 1496132479127 + permissions: {} + data: + id: natim + last_modified: 1496132446213 + groups: {} + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 + natim2: + collections: + toto: + data: + id: toto + last_modified: 1496132461211 + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 + records: + ee338fcd-3a19-4a4f-af05-a8b052a23521: + data: + id: ee338fcd-3a19-4a4f-af05-a8b052a23521 + last_modified: 1496132482950 + permissions: {} + data: + id: natim2 + last_modified: 1496132453519 + groups: {} + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 diff --git a/tests/dumps/dump-toto.yaml b/tests/dumps/dump-toto.yaml index 0f28e48..9f9b2de 100644 --- a/tests/dumps/dump-toto.yaml +++ b/tests/dumps/dump-toto.yaml @@ -1,42 +1,43 @@ -natim: - collections: - toto: - data: - id: toto - last_modified: 1496132464691 - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 - records: - e2686bac-c45e-4144-9738-edfeb3d9da6d: - data: - id: e2686bac-c45e-4144-9738-edfeb3d9da6d - last_modified: 1496132479127 - permissions: {} - data: - id: natim - last_modified: 1496132446213 - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 -natim2: - collections: - toto: - data: - id: toto - last_modified: 1496132461211 - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 - records: - ee338fcd-3a19-4a4f-af05-a8b052a23521: - data: - id: ee338fcd-3a19-4a4f-af05-a8b052a23521 - last_modified: 1496132482950 - permissions: {} - data: - id: natim2 - last_modified: 1496132453519 - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 +buckets: + natim: + collections: + toto: + data: + id: toto + last_modified: 1496132464691 + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 + records: + e2686bac-c45e-4144-9738-edfeb3d9da6d: + data: + id: e2686bac-c45e-4144-9738-edfeb3d9da6d + last_modified: 1496132479127 + permissions: {} + data: + id: natim + last_modified: 1496132446213 + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 + natim2: + collections: + toto: + data: + id: toto + last_modified: 1496132461211 + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 + records: + ee338fcd-3a19-4a4f-af05-a8b052a23521: + data: + id: ee338fcd-3a19-4a4f-af05-a8b052a23521 + last_modified: 1496132482950 + permissions: {} + data: + id: natim2 + last_modified: 1496132453519 + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 diff --git a/tests/dumps/with-groups.yaml b/tests/dumps/with-groups.yaml index 8a076c5..e4e4456 100644 --- a/tests/dumps/with-groups.yaml +++ b/tests/dumps/with-groups.yaml @@ -1,14 +1,15 @@ -natim: - collections: {} - groups: - toto: - data: - members: - - alexis - - mathieu - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 +buckets: + natim: + collections: {} + groups: + toto: + data: + members: + - alexis + - mathieu + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 diff --git a/tests/dumps/with-references.yaml b/tests/dumps/with-references.yaml index 0db9599..b914c15 100644 --- a/tests/dumps/with-references.yaml +++ b/tests/dumps/with-references.yaml @@ -3,12 +3,12 @@ attachment-schema: &attachment-schema properties: url: type: string - -main: - collections: - certificates: - data: - schema: *attachment-schema - addons: - data: - schema: *attachment-schema +buckets: + main: + collections: + certificates: + data: + schema: *attachment-schema + addons: + data: + schema: *attachment-schema diff --git a/tests/dumps/with-schema-1.yaml b/tests/dumps/with-schema-1.yaml index afb0cb9..f9989ff 100644 --- a/tests/dumps/with-schema-1.yaml +++ b/tests/dumps/with-schema-1.yaml @@ -1,33 +1,34 @@ -natim: - collections: - toto: - data: - id: toto - last_modified: 1496132464691 - schema: - title: "Recipes" - description: "ChefClub recipes" - type: object - additionalProperties: false - required: - - title - properties: - title: - type: string - title: "Title" - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 - records: - e2686bac-c45e-4144-9738-edfeb3d9da6d: - data: - id: e2686bac-c45e-4144-9738-edfeb3d9da6d - last_modified: 1496132479127 - permissions: {} - data: - id: natim - last_modified: 1496132446213 - groups: {} - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 +buckets: + natim: + collections: + toto: + data: + id: toto + last_modified: 1496132464691 + schema: + title: "Recipes" + description: "ChefClub recipes" + type: object + additionalProperties: false + required: + - title + properties: + title: + type: string + title: "Title" + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 + records: + e2686bac-c45e-4144-9738-edfeb3d9da6d: + data: + id: e2686bac-c45e-4144-9738-edfeb3d9da6d + last_modified: 1496132479127 + permissions: {} + data: + id: natim + last_modified: 1496132446213 + groups: {} + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 diff --git a/tests/dumps/with-schema-2.yaml b/tests/dumps/with-schema-2.yaml index df53bcf..50fd6c1 100644 --- a/tests/dumps/with-schema-2.yaml +++ b/tests/dumps/with-schema-2.yaml @@ -1,31 +1,32 @@ -natim: - collections: - toto: - data: - id: toto - schema: - title: "Recipes" - description: "ChefClub recipes" - type: object - additionalProperties: false - required: - - title - properties: - title: - type: string - title: "Title" - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 - records: - e2686bac-c45e-4144-9738-edfeb3d9da6d: - data: - id: e2686bac-c45e-4144-9738-edfeb3d9da6d - title: toto - permissions: {} - data: - id: natim - groups: {} - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 +buckets: + natim: + collections: + toto: + data: + id: toto + schema: + title: "Recipes" + description: "ChefClub recipes" + type: object + additionalProperties: false + required: + - title + properties: + title: + type: string + title: "Title" + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 + records: + e2686bac-c45e-4144-9738-edfeb3d9da6d: + data: + id: e2686bac-c45e-4144-9738-edfeb3d9da6d + title: toto + permissions: {} + data: + id: natim + groups: {} + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 diff --git a/tests/kinto-full.yaml b/tests/kinto-full.yaml index aa91830..cccc0d5 100644 --- a/tests/kinto-full.yaml +++ b/tests/kinto-full.yaml @@ -1,64 +1,65 @@ -build-hub: - collections: - archives: - data: - id: archives - last_modified: 1495098173096 - scan: done - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 - records: - 0831d549-0a69-48dd-b240-feef94688d47: - data: - build: - date: '2017-05-02T10:04:00' - id: '20170502100421' - download: - date: '2017-05-02T11:46:18Z' - mimetype: null - size: 64410293 - url: https://archive.mozilla.org/pub/firefox/nightly/2017/05/2017-05-02-10-02-49-mozilla-central/firefox-55.0a1.en-US.linux-i686.tar.bz2 - id: 0831d549-0a69-48dd-b240-feef94688d47 - last_modified: 1495098162940 - source: - product: firefox - revision: 48c0fd9c9ec5d68061ea7b59358874ae8da72572 - tree: mozilla-central - systemaddons: null - target: - channel: nightly - locale: en-US - platform: linux-i686 - version: 55.0a1 - permissions: {} - 0f9f1308-873f-474a-8caf-8624f62b75d4: - data: - build: - date: '2017-05-06T10:03:00' - id: '20170506100311' - download: - date: '2017-05-06T10:53:34Z' - mimetype: null - size: 64037828 - url: https://archive.mozilla.org/pub/firefox/nightly/2017/05/2017-05-06-10-03-11-mozilla-central/firefox-55.0a1.en-US.linux-x86_64.tar.bz2 - id: 0f9f1308-873f-474a-8caf-8624f62b75d4 - last_modified: 1495098162984 - source: - product: firefox - revision: 37a5b7f6f101df2eb292b1b6baaf1540c9920e20 - tree: mozilla-central - systemaddons: null - target: - channel: nightly - locale: en-US - platform: linux-x86_64 - version: 55.0a1 - permissions: {} - data: - id: build-hub - last_modified: 1495098493113 - groups: {} - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 +buckets: + build-hub: + collections: + archives: + data: + id: archives + last_modified: 1495098173096 + scan: done + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 + records: + 0831d549-0a69-48dd-b240-feef94688d47: + data: + build: + date: '2017-05-02T10:04:00' + id: '20170502100421' + download: + date: '2017-05-02T11:46:18Z' + mimetype: null + size: 64410293 + url: https://archive.mozilla.org/pub/firefox/nightly/2017/05/2017-05-02-10-02-49-mozilla-central/firefox-55.0a1.en-US.linux-i686.tar.bz2 + id: 0831d549-0a69-48dd-b240-feef94688d47 + last_modified: 1495098162940 + source: + product: firefox + revision: 48c0fd9c9ec5d68061ea7b59358874ae8da72572 + tree: mozilla-central + systemaddons: null + target: + channel: nightly + locale: en-US + platform: linux-i686 + version: 55.0a1 + permissions: {} + 0f9f1308-873f-474a-8caf-8624f62b75d4: + data: + build: + date: '2017-05-06T10:03:00' + id: '20170506100311' + download: + date: '2017-05-06T10:53:34Z' + mimetype: null + size: 64037828 + url: https://archive.mozilla.org/pub/firefox/nightly/2017/05/2017-05-06-10-03-11-mozilla-central/firefox-55.0a1.en-US.linux-x86_64.tar.bz2 + id: 0f9f1308-873f-474a-8caf-8624f62b75d4 + last_modified: 1495098162984 + source: + product: firefox + revision: 37a5b7f6f101df2eb292b1b6baaf1540c9920e20 + tree: mozilla-central + systemaddons: null + target: + channel: nightly + locale: en-US + platform: linux-x86_64 + version: 55.0a1 + permissions: {} + data: + id: build-hub + last_modified: 1495098493113 + groups: {} + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 diff --git a/tests/kinto.yaml b/tests/kinto.yaml index df51382..4533fe1 100644 --- a/tests/kinto.yaml +++ b/tests/kinto.yaml @@ -1,51 +1,52 @@ -staging: - collections: - addons: - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 - - basicauth:b9cef2faaad7c6f4a93f2f2cb1c526d97a51a3ded68051ec04aafd46880ef436 - - basicauth:cbd3731f18c97ebe1d31d9846b5f1b95cf8eeeae586e201277263434041e99d1 - - basicauth:d12a7eaa096830e2d2140331abded2d7d8019eef192e4a9e70d54efbbdf02f74 - certificates: - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 - - basicauth:b9cef2faaad7c6f4a93f2f2cb1c526d97a51a3ded68051ec04aafd46880ef436 - - basicauth:cbd3731f18c97ebe1d31d9846b5f1b95cf8eeeae586e201277263434041e99d1 - - basicauth:d12a7eaa096830e2d2140331abded2d7d8019eef192e4a9e70d54efbbdf02f74 - gfx: - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 - - basicauth:b9cef2faaad7c6f4a93f2f2cb1c526d97a51a3ded68051ec04aafd46880ef436 - - basicauth:cbd3731f18c97ebe1d31d9846b5f1b95cf8eeeae586e201277263434041e99d1 - - basicauth:d12a7eaa096830e2d2140331abded2d7d8019eef192e4a9e70d54efbbdf02f74 - plugins: - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 - - basicauth:b9cef2faaad7c6f4a93f2f2cb1c526d97a51a3ded68051ec04aafd46880ef436 - - basicauth:cbd3731f18c97ebe1d31d9846b5f1b95cf8eeeae586e201277263434041e99d1 - - basicauth:d12a7eaa096830e2d2140331abded2d7d8019eef192e4a9e70d54efbbdf02f74 - groups: - editors: - data: - members: - - basicauth:b9cef2faaad7c6f4a93f2f2cb1c526d97a51a3ded68051ec04aafd46880ef436 - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 - - basicauth:cbd3731f18c97ebe1d31d9846b5f1b95cf8eeeae586e201277263434041e99d1 - reviewers: - data: - members: - - basicauth:d12a7eaa096830e2d2140331abded2d7d8019eef192e4a9e70d54efbbdf02f74 - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 - - basicauth:cbd3731f18c97ebe1d31d9846b5f1b95cf8eeeae586e201277263434041e99d1 - permissions: - write: - - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 - - system.Authenticated +buckets: + staging: + collections: + addons: + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 + - basicauth:b9cef2faaad7c6f4a93f2f2cb1c526d97a51a3ded68051ec04aafd46880ef436 + - basicauth:cbd3731f18c97ebe1d31d9846b5f1b95cf8eeeae586e201277263434041e99d1 + - basicauth:d12a7eaa096830e2d2140331abded2d7d8019eef192e4a9e70d54efbbdf02f74 + certificates: + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 + - basicauth:b9cef2faaad7c6f4a93f2f2cb1c526d97a51a3ded68051ec04aafd46880ef436 + - basicauth:cbd3731f18c97ebe1d31d9846b5f1b95cf8eeeae586e201277263434041e99d1 + - basicauth:d12a7eaa096830e2d2140331abded2d7d8019eef192e4a9e70d54efbbdf02f74 + gfx: + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 + - basicauth:b9cef2faaad7c6f4a93f2f2cb1c526d97a51a3ded68051ec04aafd46880ef436 + - basicauth:cbd3731f18c97ebe1d31d9846b5f1b95cf8eeeae586e201277263434041e99d1 + - basicauth:d12a7eaa096830e2d2140331abded2d7d8019eef192e4a9e70d54efbbdf02f74 + plugins: + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 + - basicauth:b9cef2faaad7c6f4a93f2f2cb1c526d97a51a3ded68051ec04aafd46880ef436 + - basicauth:cbd3731f18c97ebe1d31d9846b5f1b95cf8eeeae586e201277263434041e99d1 + - basicauth:d12a7eaa096830e2d2140331abded2d7d8019eef192e4a9e70d54efbbdf02f74 + groups: + editors: + data: + members: + - basicauth:b9cef2faaad7c6f4a93f2f2cb1c526d97a51a3ded68051ec04aafd46880ef436 + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 + - basicauth:cbd3731f18c97ebe1d31d9846b5f1b95cf8eeeae586e201277263434041e99d1 + reviewers: + data: + members: + - basicauth:d12a7eaa096830e2d2140331abded2d7d8019eef192e4a9e70d54efbbdf02f74 + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 + - basicauth:cbd3731f18c97ebe1d31d9846b5f1b95cf8eeeae586e201277263434041e99d1 + permissions: + write: + - basicauth:8e79ddf13abb4e8034f060b6f2975275975e5866727595301e77ba5494b127c4 + - system.Authenticated diff --git a/tests/test_functional.py b/tests/test_functional.py index 8983231..3c5a2de 100644 --- a/tests/test_functional.py +++ b/tests/test_functional.py @@ -307,6 +307,10 @@ def test_file_can_have_yaml_references(self): collection = client.get_collection(bucket="main", id="addons") assert 'url' in collection['data']['schema']['properties'] + # the anchor did not get interpreted as a bucket: + with self.assertRaises(exceptions.KintoException): + client.get_collection(bucket="attachment-schema") + class MiscUpdates(FunctionalTest): def get_client(self):