| | |
| | | import org.opends.server.tools.upgrade.UpgradeCli; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.util.StaticUtils; |
| | | import org.testng.annotations.Test; |
| | | |
| | | import static org.opends.messages.ToolMessages.*; |
| | |
| | | + File.separator + "config" + File.separator + "config.ldif"; |
| | | |
| | | /** |
| | | * Sets the args for the upgrade tools. The configFile parameter is |
| | | * configured by default.<pre> |
| | | * Sets the args for the upgrade tools. The configFile parameter is configured |
| | | * by default. |
| | | * |
| | | * <pre> |
| | | * usage : {@code}setArgs("--force", "--no-prompt") {@code} |
| | | * corresponds to command line : ./upgrade --force -n</pre> |
| | | * corresponds to command line : ./upgrade --force -n |
| | | * </pre> |
| | | * |
| | | * @param args |
| | | * The argument you want for testing. |
| | |
| | | final Message expectedMessage) |
| | | { |
| | | return (output.replaceAll("\n", " ").replaceAll("%s", " ").indexOf( |
| | | expectedMessage.toString().replaceAll("\n", " ") |
| | | .replaceAll("%s", " ")) != -1); |
| | | expectedMessage.toString().replaceAll("\n", " ").replaceAll("%s", " ")) != -1); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | finally |
| | | { |
| | | ps.close(); |
| | | StaticUtils.close(ps, baos); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | finally |
| | | { |
| | | ps.close(); |
| | | StaticUtils.close(ps, baos); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | finally |
| | | { |
| | | ps.close(); |
| | | StaticUtils.close(ps, baos); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | finally |
| | | { |
| | | ps.close(); |
| | | StaticUtils.close(ps, baos); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | finally |
| | | { |
| | | ps.close(); |
| | | StaticUtils.close(ps, baos); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | finally |
| | | { |
| | | ps.close(); |
| | | StaticUtils.close(ps, baos); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | finally |
| | | { |
| | | ps.close(); |
| | | StaticUtils.close(ps, baos); |
| | | TestCaseUtils |
| | | .shutdownServer("testUpgradeToolAllowsNonInteractiveAndForce"); |
| | | } |