tempest: Allow to configure granularity

Change-Id: I31344a9f8938ae9c7875cad76430508dd9fd4539
diff --git a/ceilometer/tests/tempest/config.py b/ceilometer/tests/tempest/config.py
index 4125a7f..0df195b 100644
--- a/ceilometer/tests/tempest/config.py
+++ b/ceilometer/tests/tempest/config.py
@@ -47,4 +47,9 @@
                default=1,
                help="The seconds to sleep after an unsuccessful "
                     "notification received."),
+    cfg.IntOpt('alarm_granularity',
+               default=300,
+               help="Granularity to use for aodh alarms. This must match the "
+                    "configured Gnocchi archive policy")
+
 ]
diff --git a/ceilometer/tests/tempest/scenario/test_telemetry_integration.py b/ceilometer/tests/tempest/scenario/test_telemetry_integration.py
index d2dec4b..fecebae 100644
--- a/ceilometer/tests/tempest/scenario/test_telemetry_integration.py
+++ b/ceilometer/tests/tempest/scenario/test_telemetry_integration.py
@@ -83,6 +83,7 @@
 
         os.environ.update({
             "ADMIN_TOKEN": auth[0],
+            "AODH_GRANULARITY": str(config.CONF.telemetry.alarm_granularity),
             "AODH_SERVICE_URL": self._get_endpoint(auth, "alarming_plugin"),
             "GNOCCHI_SERVICE_URL": self._get_endpoint(auth, "metric"),
             "PANKO_SERVICE_URL": self._get_endpoint(auth, "event"),