Example #1
0
    def setUp(self):
        super(TestStatsd, self).setUp()

        self.conf.set_override("resource_id", str(uuid.uuid4()), "statsd")
        self.conf.set_override("creator", self.STATSD_USER_ID, "statsd")
        self.conf.set_override("archive_policy_name",
                               self.STATSD_ARCHIVE_POLICY_NAME, "statsd")

        self.stats = statsd.Stats(self.conf)
        # Replace storage/indexer with correct ones that have been upgraded
        self.stats.storage = self.storage
        self.stats.indexer = self.index
        self.server = statsd.StatsdServer(self.stats)
Example #2
0
    def setUp(self):
        super(TestStatsd, self).setUp()

        self.conf.set_override("resource_id", uuid.uuid4(), "statsd")
        self.conf.set_override("user_id", self.STATSD_USER_ID, "statsd")
        self.conf.set_override("project_id", self.STATSD_PROJECT_ID, "statsd")
        self.conf.set_override("archive_policy_name",
                               self.STATSD_ARCHIVE_POLICY_NAME, "statsd")

        # NOTE(jd) Always use self.stats.storage and self.stats.indexer to
        # pick at the right storage/indexer used by the statsd server, and not
        # new instances from the base test class.
        self.stats = statsd.Stats(self.conf)
        self.server = statsd.StatsdServer(self.stats)
Example #3
0
    def setUp(self):
        super(TestStatsd, self).setUp()

        self.conf.set_override("resource_id", str(uuid.uuid4()), "statsd")
        self.conf.set_override("creator", self.STATSD_USER_ID, "statsd")
        self.conf.set_override("archive_policy_name",
                               self.STATSD_ARCHIVE_POLICY_NAME, "statsd")
        ap = self.ARCHIVE_POLICIES["medium"]
        self.aggregations = ap.get_aggregations_for_method("mean")

        self.stats = statsd.Stats(self.conf)
        # Replace storage/indexer with correct ones that have been upgraded
        self.stats.incoming = self.incoming
        self.stats.indexer = self.index
        self.server = statsd.StatsdServer(self.stats)