mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

andrug
01.29.2008 87fadb5ec86d2c7927099090a528d16a444afd4c
QA: System Test: allow monitoring client to use dedicated config.xml file
2 files modified
29 ■■■■ changed files
opends/tests/system-tests/clients/monitoring/monitoringLib.xml 12 ●●●● patch | view | raw | blame | history
opends/tests/system-tests/clients/monitoring/monitoringPreamble.xml 17 ●●●●● patch | view | raw | blame | history
opends/tests/system-tests/clients/monitoring/monitoringLib.xml
@@ -66,10 +66,15 @@
        if serverInstanceFromClient == NOT_DEFINED:
          msg = '%s\nERROR: serverInstanceFromClient undefined,mandatory' % msg
        
        needCopy = 0
        configFile = getPropValue('configFile')
        if configFile == NOT_DEFINED or configFile == '':
          configFile = '%s/MonitoringClient/config.xml' % client.getPath()
          configFilePath = '%s/MonitoringClient/config.xml' % client.getPath()
        elif configFile.find('/') == -1:
          needCopy = 1
          configFilePath = '%s/scenario/%s/%s' % \
                           (LOCAL_TESTS_DIR,DIR_NAME,configFile)
        
        interval = getPropValue('interval')
        unit = getPropValue('unit')
@@ -95,7 +100,7 @@
              parms.append('-m "%s""' %  serverInstance.getJVMPort())
            parms.append('-D "%s" -w "%s"' % \
                        (DIRECTORY_INSTANCE_DN,DIRECTORY_INSTANCE_PSWD))
            parms.append('-f %s -r %s' % (configFile,client.getLogDir()))
            parms.append('-f %s -r %s' % (configFilePath,client.getLogDir()))
            if interval != NOT_DEFINED:
              parms.append(' -i %s' % interval)
            if unit != NOT_DEFINED:
@@ -126,6 +131,7 @@
        
        
      </script>
    </sequence>
  </function>
  
opends/tests/system-tests/clients/monitoring/monitoringPreamble.xml
@@ -84,6 +84,23 @@
        </sequence>
      <else>
        <sequence>
          <if expr="needCopy == 1">
            <sequence>
              <call function="'copyFile'">
              {
                'srcFile'    : '%s/scenario/%s/%s' % \
                               (TESTS_DIR,scenario.getName(),configFile),
                'destFile'   : configFilePath,
                'location'   : STAXServiceMachine,
                'remoteHost' : client.getHost(),
                'fileFd'     : fileFd
              }
              </call>
              <script>errNum += STAXResult[0]</script>
            </sequence>
          </if>
          <!-- ========================================================== -->
          <!-- =============== Build Monitoring Client ================== -->
          <!-- ========== Run the client ========== -->