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

andrug
18.43.2008 f9de0f451ec2232bdd19ad10780b3e09b3d6ddee
detail pre/post conf example in sample2 scenario
3 files modified
115 ■■■■■ changed files
opends/tests/system-tests/phases/log/log.xml 50 ●●●●● patch | view | raw | blame | history
opends/tests/system-tests/scenario/sample2/post_configuration.xml 33 ●●●● patch | view | raw | blame | history
opends/tests/system-tests/scenario/sample2/pre_configuration.xml 32 ●●●●● patch | view | raw | blame | history
opends/tests/system-tests/phases/log/log.xml
@@ -487,7 +487,55 @@
      </if>
    </sequence>
  </function>
  <!-- ************************************************************ -->
  <function name="writeStartTagInstance" scope="local">
   <function-prolog>
      ''
    </function-prolog>
    <function-map-args>
      <function-arg-def name="instance" type="required">
      </function-arg-def>
      <function-arg-def name="fileFd" type="required">
        <function-arg-description>
          file descriptor
        </function-arg-description>
      </function-arg-def>
    </function-map-args>
    <sequence>
      <if expr="fileFd != NO_FILE">
        <script>
          str = '\n&lt;instance name=\"%s\"' % instance.getName()
          str = '%s host=\"%s\"' % (str, instance.getHost())
          str = '%s port=\"%s\"' % (str, instance.getLDAPPort())
          str = '%s product=\"%s\"&gt;\n' % (str, instance.getProduct())
          fileFd.write(str)
        </script>
      </if>
    </sequence>
  </function>
  <function name="writeEndTagInstance" scope="local">
   <function-prolog>
      ''
    </function-prolog>
    <function-map-args>
      <function-arg-def name="fileFd" type="required">
        <function-arg-description>
          file descriptor
        </function-arg-description>
      </function-arg-def>
    </function-map-args>
    <sequence>
      <if expr="fileFd != NO_FILE">
        <script>
          fileFd.write('&lt;/instance&gt;\n\n')
        </script>
      </if>
    </sequence>
  </function>
  <!-- ************************************************************ -->
  <function name="writeStartTagOperation" scope="local">
opends/tests/system-tests/scenario/sample2/post_configuration.xml
@@ -44,25 +44,50 @@
    </function-map-args>
    
    <sequence>
      <!-- == Call preambule == -->
      <!-- ================= Call preambule ======================== -->
      <call function="'phasePreamble'">
      { 'phaseName' : 'postconfiguration' ,
      { 'phaseName' : 'postconfiguration',
        'fileFd'    : LOG_MAIN_FD }
      </call>
      
      
      
      <!-- ================= Display instance names ================ -->
      <iterate in="instances" var="instance">
        <sequence>
          <!-- == Write tag for xml report -->
          <call function="'writeStartTagInstance'">
          {
            'instance' : instance,
            'fileFd'   : LOG_MAIN_FD
          }
          </call>
          <call function="'writeMessage'">
          {
            'fileFd'  : LOG_MAIN_FD,
            'content' : 'my instance is : %s' % instance.getName()
          }
          </call>
          <!-- == Write tag for xml report -->
          <call function="'writeEndTagInstance'">
          { 'fileFd'    : LOG_MAIN_FD }
          </call>
        </sequence>
      </iterate>
      
      
      
      <!-- ==  Call postphase == -->
      <!-- ================= Call postambule ======================= -->
      <call function="'phasePostamble'">
      {
        'phaseName' : 'postconfiguration',
        'fileFd'    : LOG_MAIN_FD
      }
      </call>
    </sequence>
  </function>
  
opends/tests/system-tests/scenario/sample2/pre_configuration.xml
@@ -44,18 +44,44 @@
    </function-map-args>
    
    <sequence>
      <!-- == Call preambule == -->
      <!-- ================= Call preambule ======================== -->
      <call function="'phasePreamble'">
      { 'phaseName' : 'preconfiguration' ,
      { 'phaseName' : 'preconfiguration',
        'fileFd'    : LOG_MAIN_FD }
      </call>
      
      
      
      <!-- ================= Display instance names ================ -->
      <iterate in="instances" var="instance">
        <sequence>
          <!-- == Write tag for xml report -->
          <call function="'writeStartTagInstance'">
          {
            'instance' : instance,
            'fileFd'   : LOG_MAIN_FD
          }
          </call>
          <call function="'writeMessage'">
          {
            'fileFd'  : LOG_MAIN_FD,
            'content' : 'my instance is : %s' % instance.getName()
          }
          </call>
          <!-- == Write tag for xml report -->
          <call function="'writeEndTagInstance'">
          { 'fileFd'    : LOG_MAIN_FD }
          </call>
        </sequence>
      </iterate>
      
      
      
      <!-- ==  Call postphase == -->
      <!-- ================= Call postambule ======================= -->
      <call function="'phasePostamble'">
      {
        'phaseName' : 'preconfiguration',