|
2 | 2 |
|
3 | 3 | import com.marklogic.bootstrap.Installer; |
4 | 4 | import com.marklogic.hub.ApplicationConfig; |
| 5 | +import com.marklogic.hub.DatabaseKind; |
5 | 6 | import com.marklogic.hub.HubTestBase; |
6 | 7 | import org.custommonkey.xmlunit.XMLUnit; |
7 | 8 | import org.junit.jupiter.api.AfterAll; |
|
11 | 12 | import org.springframework.test.context.ContextConfiguration; |
12 | 13 | import org.springframework.test.context.junit.jupiter.SpringExtension; |
13 | 14 |
|
| 15 | +import java.util.Map; |
| 16 | + |
| 17 | +import static org.junit.jupiter.api.Assertions.assertNotNull; |
| 18 | + |
14 | 19 | @ExtendWith(SpringExtension.class) |
15 | 20 | @ContextConfiguration(classes = ApplicationConfig.class) |
16 | 21 | public class RunFlowViaMainTest extends HubTestBase { |
@@ -39,9 +44,18 @@ public void testRunFlow() { |
39 | 44 | "-host", host, |
40 | 45 | "-username", flowRunnerUser, |
41 | 46 | "-password", flowRunnerPassword, |
42 | | - "-flowName", flowName |
| 47 | + "-flowName", flowName, |
| 48 | + // Including this to verify that -P flags don't break things |
| 49 | + "-PmlStagingPort=" + adminHubConfig.getPort(DatabaseKind.STAGING) |
43 | 50 | }); |
44 | 51 |
|
45 | 52 | verifyCollectionCountsFromRunningTestFlow(); |
46 | 53 | } |
| 54 | + |
| 55 | + @Test |
| 56 | + void paramsMapHasToBeNonNull() { |
| 57 | + Map<String, String> params = new RunFlowCommand().getParams(); |
| 58 | + assertNotNull(params, "jcommander requires that the map backing a DynamicParameter annotation not be null; " + |
| 59 | + "if it is null, then jcommander will throw a null-pointer exception"); |
| 60 | + } |
47 | 61 | } |
0 commit comments