integration-tests/src/test/java/oracle/kubernetes/operator/utils/Domain.java
public void verifyDomainServerPodRestart(String fileNameWithChangedProperty) throws Exception {
    LoggerHelper.getLocal().log(Level.INFO,
        "Inside testDomainServerPodRestart domainYamlWithChangedProperty");

    final String newDomainYamlFile =
        userProjectsDir + "/weblogic-domains/" + domainUid + "/domain_new.yaml";
    final String domainYamlFile =
        userProjectsDir + "/weblogic-domains/" + domainUid + "/domain.yaml";
    final String changedDomainYamlFile =
        userProjectsDir + "/weblogic-domains/" + domainUid + "/domain_change.yaml";
    final String fileWithChangedProperty =
        BaseTest.getProjectRoot()
            + "/integration-tests/src/test/resources/"
            + fileNameWithChangedProperty;

    // copy the original domain.yaml to domain_change.yaml
    TestUtils.copyFile(domainYamlFile, changedDomainYamlFile);

    // append the file with changed property to the end of domain_change.yaml
    Files.write(
        Paths.get(changedDomainYamlFile),
        Files.readAllBytes(Paths.get(fileWithChangedProperty)),
        StandardOpenOption.APPEND);
    
    String oldPvc = "domainpodsrestart-weblogic-sample-pvc";
    String newPvc = domainUid + "-" + pvMap.get("baseName") + "-pvc";
    LoggerHelper.getLocal().log(Level.INFO, "newPvc in verifyDomainServerPodRestart: " + newPvc);
    modifyPropertyInYaml(oldPvc, newPvc, changedDomainYamlFile, newDomainYamlFile);
    // kubectl apply the new constructed domain_new.yaml
    StringBuffer command = new StringBuffer();
    command.append("kubectl apply  -f ").append(newDomainYamlFile);
    LoggerHelper.getLocal().log(Level.INFO, "kubectl execute with command: " + command.toString());
    TestUtils.execOrAbortProcess(command.toString());

    // verify the servers in the domain are being restarted in a sequence
    verifyAdminServerRestarted();
    verifyManagedServersRestarted();

    // make domain.yaml include the new changed property
    TestUtils.copyFile(newDomainYamlFile, domainYamlFile);

    LoggerHelper.getLocal().log(
        Level.INFO, "Done - testDomainServerPodRestart with domainYamlWithChangedProperty");
  }
/**
   * Verify domain server pods get restarted after the property change by kubectl apply -f new
   * domain yaml file with added/changed property.
   *
   * @param fileNameWithChangedProperty - the fragment of domain yaml file with new added property
   *                                    change
   * @throws Exception - IOException or errors occurred if the tested server is not restarted
   */
Verify domain server pods get restarted after the property change by kubectl apply -f new
domain yaml file with added/changed property.

@param fileNameWithChangedProperty - the fragment of domain yaml file with new added property
change
@throws Exception - IOException or errors occurred if the tested server is not restarted
Verify domain server pods get restarted after the property change by kubectl apply - f new domain yaml file with added / changed property . @param fileNameWithChangedProperty - the fragment of domain yaml file with new added property change @throws Exception - IOException or errors occurred if the tested server is not restarted
public void verifyDomainServerPodRestart(String fileNameWithChangedProperty) throws Exception {
    LoggerHelper.getLocal().log(Level.INFO,
        "Inside testDomainServerPodRestart domainYamlWithChangedProperty");
    final String newDomainYamlFile =
        userProjectsDir + "/weblogic-domains/" + domainUid + "/domain_new.yaml";
    final String domainYamlFile =
        userProjectsDir + "/weblogic-domains/" + domainUid + "/domain.yaml";
    final String changedDomainYamlFile =
        userProjectsDir + "/weblogic-domains/" + domainUid + "/domain_change.yaml";
    final String fileWithChangedProperty =
        BaseTest.getProjectRoot()
            + "/integration-tests/src/test/resources/"
            + fileNameWithChangedProperty;
    TestUtils.copyFile(domainYamlFile, changedDomainYamlFile);
    Files.write(
        Paths.get(changedDomainYamlFile),
        Files.readAllBytes(Paths.get(fileWithChangedProperty)),
        StandardOpenOption.APPEND);
    String oldPvc = "domainpodsrestart-weblogic-sample-pvc";
    String newPvc = domainUid + "-" + pvMap.get("baseName") + "-pvc";
    LoggerHelper.getLocal().log(Level.INFO, "newPvc in verifyDomainServerPodRestart: " + newPvc);
    modifyPropertyInYaml(oldPvc, newPvc, changedDomainYamlFile, newDomainYamlFile);
    StringBuffer command = new StringBuffer();
    command.append("kubectl apply  -f ").append(newDomainYamlFile);
    LoggerHelper.getLocal().log(Level.INFO, "kubectl execute with command: " + command.toString());
    TestUtils.execOrAbortProcess(command.toString());
    verifyAdminServerRestarted();
    verifyManagedServersRestarted();
    TestUtils.copyFile(newDomainYamlFile, domainYamlFile);
    LoggerHelper.getLocal().log(
        Level.INFO, "Done - testDomainServerPodRestart with domainYamlWithChangedProperty");
  }
public void verifyDomainServerPodRestart ( String fileNameWithChangedProperty ) throws Exception { LoggerHelper . getLocal ( ) . log ( Level . INFO , "Inside testDomainServerPodRestart domainYamlWithChangedProperty" ) ; final String newDomainYamlFile = userProjectsDir + "/weblogic-domains/" + domainUid + "/domain_new.yaml" ; final String domainYamlFile = userProjectsDir + "/weblogic-domains/" + domainUid + "/domain.yaml" ; final String changedDomainYamlFile = userProjectsDir + "/weblogic-domains/" + domainUid + "/domain_change.yaml" ; final String fileWithChangedProperty = BaseTest . getProjectRoot ( ) + "/integration-tests/src/test/resources/" + fileNameWithChangedProperty ; TestUtils . copyFile ( domainYamlFile , changedDomainYamlFile ) ; Files . write ( Paths . get ( changedDomainYamlFile ) , Files . readAllBytes ( Paths . get ( fileWithChangedProperty ) ) , StandardOpenOption . APPEND ) ; String oldPvc = "domainpodsrestart-weblogic-sample-pvc" ; String newPvc = domainUid + "-" + pvMap . get ( "baseName" ) + "-pvc" ; LoggerHelper . getLocal ( ) . log ( Level . INFO , "newPvc in verifyDomainServerPodRestart: " + newPvc ) ; modifyPropertyInYaml ( oldPvc , newPvc , changedDomainYamlFile , newDomainYamlFile ) ; StringBuffer command = new StringBuffer ( ) ; command . append ( "kubectl apply  -f " ) . append ( newDomainYamlFile ) ; LoggerHelper . getLocal ( ) . log ( Level . INFO , "kubectl execute with command: " + command . toString ( ) ) ; TestUtils . execOrAbortProcess ( command . toString ( ) ) ; verifyAdminServerRestarted ( ) ; verifyManagedServersRestarted ( ) ; TestUtils . copyFile ( newDomainYamlFile , domainYamlFile ) ; LoggerHelper . getLocal ( ) . log ( Level . INFO , "Done - testDomainServerPodRestart with domainYamlWithChangedProperty" ) ; }
Verify domain server pods get restarted after the property change by kubectl apply -f new
 domain yaml file with added/changed property.
Verify domain server pods get restarted after the property change by kubectl apply - f new domain yaml file with added / changed property .
// copy the original domain.yaml to domain_change.yaml // append the file with changed property to the end of domain_change.yaml // kubectl apply the new constructed domain_new.yaml // verify the servers in the domain are being restarted in a sequence // make domain.yaml include the new changed property