Skip to content
Snippets Groups Projects
Select Git revision
  • b2ec6562dfa5a589eabbf470411c9b19ea649d55
  • master default protected
  • replication_test
  • release-1.10 protected
  • dev protected
  • 556-usage-statistics
  • 553-semantic-recommendation-2
  • 553-semantic-recommendation
  • release-1.9 protected
  • 551-init-broker-service-permissions
  • 549-test-oai-pmh
  • 545-saving-multiple-times-breaks-pid-metadata
  • 499-standalone-compute-service-2
  • 539-load-tests
  • hotfix/helm-chart
  • luca_ba_new_interface
  • 534-bug-when-adding-access-to-user-that-is-not-registered-at-dashboard-service
  • release-1.8 protected
  • 533-integrate-semantic-recommendation
  • feature/openshift
  • 518-spark-doesn-t-map-the-headers-correct
  • v1.10.4 protected
  • v1.10.3 protected
  • v1.10.2 protected
  • v1.10.1 protected
  • v1.10.0-rc13 protected
  • v1.10.0-rc12 protected
  • v1.10.0-rc11 protected
  • v1.10.0-rc10 protected
  • v1.10.0-rc9 protected
  • v1.10.0-rc8 protected
  • v1.10.0-rc7 protected
  • v1.10.0-rc6 protected
  • v1.10.0-rc5 protected
  • v1.10.0-rc4 protected
  • v1.10.0-rc3 protected
  • v1.10.0-rc2 protected
  • v1.10.0rc1 protected
  • v1.10.0rc0 protected
  • v1.10.0 protected
  • v1.9.3 protected
41 results

querystore.sql

Blame
  • ver_class.py 2.56 KiB
    class ${testSpecClassName}Verification:
        def __init__(self):
            self.id = '$testSpecFileName'
            self.name = '$testSpecName'
            self.description = '$testSpecDescription'
            self.precondition = ''
            self.comment = ''
            self.number_of_steps = None
            self.successful_steps = 0
            self.step_results = []
            self.test_passed = None
            self.precond_ok = False
            self.integrity = True
            self.exceptions = []
            self.run_id = False
    
            # some tests are depended on other tests, thus information is stored on class level
            # insert class variables here
    
        @staticmethod
        def version():
            return '${testSpecVersion}'
    
        def verify(self, command_log_file, saved_pool_file):
            """ Used to verify a test afterward it was run. The command log file and the saved pool file are needed.
            :param str command_log_file: log file of the command script
            :param str saved_pool_file: file where the pool was saved
            """
            assert os.path.isfile(os.path.realpath(command_log_file)) is True
            assert os.path.isfile(os.path.realpath(saved_pool_file)) is True
    
            # ------- load pool from a file -------
            # load the tmpool file into the database
            if not cfl.is_open('poolviewer'):
                logger.error('Poolviewer has to be running to manually verify steps')
                return
            pv = cfl.dbus_connection('poolviewer')
            cfl.Functions(pv, 'load_pool', filename=saved_pool_file)
            pool_name = cfl.Variables(pv, 'active_pool_info')[0]
    
            # ------- analyze command log -> get step start CUC timestamps, TCid and step end CUC timestamps -------
            # ToDo
            self.run_id = False
            steps = analyse_command_log.get_steps(filename=command_log_file)
            tcs = analyse_command_log.get_sent_tcs(filename=command_log_file)
            # ------- loop over the verification steps, show progress -------
            # ToDo
            # ------- show final result -------
            # ToDo
    
        def vrc_step_begin(self, pool_name, param, run_id, step_id):
            if run_id:
                self.run_id = run_id
            else:
                if not self.run_id:
                    now = datetime.now()  # current date and time
                    self.run_id = now.strftime("%Y%m%d%H%M%S")
    
            step_start_cuc = cfl.get_last_pckt_time(pool_name=pool_name, string=False)
            report.verification_step_begin(step_param=param, script_version=self.version(), pool_name=pool_name,
                                           step_start_cuc=step_start_cuc, run_id=self.run_id, step_id=step_id)