From e521b43bf59c5e7e09224507b9457d397c3811ac Mon Sep 17 00:00:00 2001
From: Valery Kharseko <vharseko@3a-systems.ru>
Date: Thu, 01 Oct 2026 13:22:25 +0000
Subject: [PATCH] [#1128] Replace the DocBook xinclude and olink leftovers of the generated reference with AsciiDoc (#1132)
---
opendj-server-legacy/src/test/java/org/opends/server/tools/UpgradeTestCase.java | 31 +++++++++++++++++++++++++++++++
1 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/tools/UpgradeTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/tools/UpgradeTestCase.java
index ed63c67..355d9b6 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/tools/UpgradeTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/tools/UpgradeTestCase.java
@@ -12,6 +12,7 @@
* information: "Portions Copyright [year] [name of copyright owner]".
*
* Portions Copyright 2013-2016 ForgeRock AS.
+ * Portions Copyright 2026 3A Systems, LLC.
*/
package org.opends.server.tools;
@@ -29,6 +30,7 @@
import org.testng.annotations.Test;
import static com.forgerock.opendj.cli.ArgumentConstants.*;
+import static com.forgerock.opendj.cli.ArgumentParser.PROPERTY_SCRIPT_NAME;
import static org.opends.messages.ToolMessages.*;
import static org.testng.Assert.*;
@@ -114,6 +116,35 @@
}
}
+ /** The generated reference of the upgrade tool includes its AsciiDoc description (#1128). */
+ @Test
+ public void testUpgradeToolGenerateDocIncludesItsDescriptionSupplement() throws Exception
+ {
+ final String scriptName = System.getProperty(PROPERTY_SCRIPT_NAME);
+ System.setProperty("org.forgerock.opendj.gendoc", "true");
+ System.setProperty(PROPERTY_SCRIPT_NAME, "upgrade");
+ try (final ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ final PrintStream ps = new PrintStream(baos))
+ {
+ assertEquals(UpgradeCli.main(setArgs("-?"), true, ps, ps), 0);
+ Assertions.assertThat(baos.toString())
+ .contains("include::./_description-upgrade.adoc[]")
+ .doesNotContain("<xinclude:include");
+ }
+ finally
+ {
+ System.clearProperty("org.forgerock.opendj.gendoc");
+ if (scriptName != null)
+ {
+ System.setProperty(PROPERTY_SCRIPT_NAME, scriptName);
+ }
+ else
+ {
+ System.clearProperty(PROPERTY_SCRIPT_NAME);
+ }
+ }
+ }
+
/** Tests the upgrade tool with an invalid sub-command. */
@Test
public void testUpgradeToolDoesntAllowWrongSubcommand() throws Exception
--
Gitblit v1.10.0