Exemplo n.º 1
0
    def _collect_case_data(self):
        assert_equal(True, ansible_ctl.collect_data(), message='Failed to collect footprint data!')
        self.case_recorder.write_end()

        LOG.info('Parse log and generate html reports')
        try:
            parser.parse(self.__data_path)
        except RuntimeError as err:
            LOG.warning('Error on parsing log or generating reports: ')
            LOG.warning(err)
Exemplo n.º 2
0
    def _collect_case_data(self):
        assert_equal(True, ansible_ctl.collect_data(), message='Failed to collect footprint data!')
        self.case_recorder.write_end()

        LOG.info('Parse log and generate html reports')
        try:
            parser.parse(self.__data_path)
        except RuntimeError as err:
            LOG.warning('Error on parsing log or generating reports: ')
            LOG.warning(err)
Exemplo n.º 3
0
    def test_runtime(self):
        """ Testing footprint scenario: poller """
        self.__case_recorder.write_interval(ansible_ctl.get_data_interval())
        self.__case_recorder.write_start()

        assert_equal(True, ansible_ctl.start_daemon(), \
                    message='Failed to start data collection daemon!')

        # Run test scenario
        # In this case, wait for 15 mins to let RackHD run pollers
        LOG.info('Start test case...')
        time.sleep(900)
        LOG.info('End test case. Fetch log...')

        assert_equal(True, ansible_ctl.collect_data(), message='Failed to collect footprint data!')
        self.__case_recorder.write_end()

        parser.parse(self.__data_path)
Exemplo n.º 4
0
    def test_runtime(self):
        """ Testing footprint scenario: poller """
        self.__case_recorder.write_interval(ansible_ctl.get_data_interval())
        self.__case_recorder.write_start()

        assert_equal(True, ansible_ctl.start_daemon(), \
                    message='Failed to start data collection daemon!')

        # Run test scenario
        # In this case, wait for 15 mins to let RackHD run pollers
        LOG.info('Start test case...')
        time.sleep(900)
        LOG.info('End test case. Fetch log...')

        assert_equal(True,
                     ansible_ctl.collect_data(),
                     message='Failed to collect footprint data!')
        self.__case_recorder.write_end()

        parser.parse(self.__data_path)