diff --git a/doc/source/rest.yaml b/doc/source/rest.yaml index 98793a858..9db1d8bab 100644 --- a/doc/source/rest.yaml +++ b/doc/source/rest.yaml @@ -4,7 +4,7 @@ Content-Type: application/json { - "name": "low", + "name": "short", "back_window": 0, "definition": [ { @@ -24,7 +24,7 @@ Content-Type: application/json { - "name": "low-without-max", + "name": "short-without-max", "aggregation_methods": ["-max", "-min"], "back_window": 0, "definition": [ @@ -69,7 +69,7 @@ Content-Type: application/json { - "name": "medium", + "name": "some-archive-policy", "back_window": 0, "definition": [ { @@ -92,7 +92,7 @@ Content-Type: application/json { - "archive_policy_name": "low" + "archive_policy_name": "high" } - name: create-metric-2 diff --git a/gnocchi/gendoc.py b/gnocchi/gendoc.py index 880806547..63a4e9b13 100644 --- a/gnocchi/gendoc.py +++ b/gnocchi/gendoc.py @@ -31,7 +31,6 @@ _RUN = False def _setup_test_app(): t = test_rest.RestTest() - t.skip_archive_policies_creation = True t.auth = True t.setUp() return t.app diff --git a/gnocchi/tests/base.py b/gnocchi/tests/base.py index 472afeb0c..283e18d38 100644 --- a/gnocchi/tests/base.py +++ b/gnocchi/tests/base.py @@ -403,14 +403,12 @@ class TestCase(base.BaseTestCase): self.archive_policies = self.ARCHIVE_POLICIES.copy() self.archive_policies.update(archive_policy.DEFAULT_ARCHIVE_POLICIES) - # Used in gnocchi.gendoc - if not getattr(self, "skip_archive_policies_creation", False): - for name, ap in six.iteritems(self.archive_policies): - # Create basic archive policies - try: - self.index.create_archive_policy(ap) - except indexer.ArchivePolicyAlreadyExists: - pass + for name, ap in six.iteritems(self.archive_policies): + # Create basic archive policies + try: + self.index.create_archive_policy(ap) + except indexer.ArchivePolicyAlreadyExists: + pass if swexc: self.useFixture(mockpatch.Patch(