Skip to content

Commit 4008dfe

Browse files
georgeajitgeorgeajit
authored andcommitted
No Task - Enable security on the REST server if DMSDK tests run first.
1 parent 9968afe commit 4008dfe

File tree

9 files changed

+27
-1
lines changed

9 files changed

+27
-1
lines changed

marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/datamovement/functionaltests/ApplyTransformTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ public static void setUpBeforeClass() throws Exception {
127127
// Create App Server if needed.
128128
createRESTServerWithDB(server, port);
129129
assocRESTServer(server, dbName, port);
130+
if (IsSecurityEnabled()) {
131+
enableSecurityOnRESTServer(server, dbName);
132+
}
130133

131134
dbClient = getDatabaseClient(user, password, Authentication.DIGEST);
132135
DatabaseClient adminClient = DatabaseClientFactory.newClient(host, 8000, user, password, Authentication.DIGEST);

marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/datamovement/functionaltests/DeleteListenerTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ public static void setUpBeforeClass() throws Exception {
9797
createRESTServerWithDB(server, port);
9898

9999
assocRESTServer(server, dbName, port);
100+
if (IsSecurityEnabled()) {
101+
enableSecurityOnRESTServer(server, dbName);
102+
}
100103

101104
dbClient = getDatabaseClient(user, password, Authentication.DIGEST);
102105
DatabaseClient adminClient = DatabaseClientFactory.newClient(host, 8000, user, password, Authentication.DIGEST);

marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/datamovement/functionaltests/ExportListenerTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ public static void setUpBeforeClass() throws Exception {
8181
// Create App Server if needed.
8282
createRESTServerWithDB(server, port);
8383
assocRESTServer(server, dbName, port);
84+
if (IsSecurityEnabled()) {
85+
enableSecurityOnRESTServer(server, dbName);
86+
}
8487

8588
dbClient = getDatabaseClient(user, password, Authentication.DIGEST);
8689
DatabaseClient adminClient = DatabaseClientFactory.newClient(host, 8000, user, password, Authentication.DIGEST);

marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/datamovement/functionaltests/ExportToWriterListenerTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ public static void setUpBeforeClass() throws Exception {
116116
// Create App Server if needed.
117117
createRESTServerWithDB(server, port);
118118
assocRESTServer(server, dbName, port);
119+
if (IsSecurityEnabled()) {
120+
enableSecurityOnRESTServer(server, dbName);
121+
}
119122

120123
dbClient = getDatabaseClient(user, password, Authentication.DIGEST);
121124
DatabaseClient adminClient = DatabaseClientFactory.newClient(host, 8000, user, password, Authentication.DIGEST);

marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/datamovement/functionaltests/QBFailover.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ public static void setUpBeforeClass() throws Exception {
185185
// Create App Server if needed.
186186
createRESTServerWithDB(server, port);
187187
associateRESTServerWithDB(server, dbName);
188+
if (IsSecurityEnabled()) {
189+
enableSecurityOnRESTServer(server, dbName);
190+
}
188191
// StringHandle
189192
stringTriple = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><foo>This is so foo</foo>";
190193
stringHandle = new StringHandle(stringTriple);

marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/datamovement/functionaltests/QueryBatcherJobReportTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,10 @@ public static void setUpBeforeClass() throws Exception {
106106
}
107107
// Create App Server if needed.
108108
createRESTServerWithDB(server, port);
109-
110109
assocRESTServer(server, dbName, port);
110+
if (IsSecurityEnabled()) {
111+
enableSecurityOnRESTServer(server, dbName);
112+
}
111113

112114
clusterInfo = ((DatabaseClientImpl) adminClient).getServices()
113115
.getResource(null, "internal/forestinfo", null, null, new JacksonHandle()).get();

marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/datamovement/functionaltests/WBFailover.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,9 @@ public static void setUpBeforeClass() throws Exception {
162162
// Create App Server if needed.
163163
createRESTServerWithDB(server, port);
164164
associateRESTServerWithDB(server, dbName);
165+
if (IsSecurityEnabled()) {
166+
enableSecurityOnRESTServer(server, dbName);
167+
}
165168
// StringHandle
166169
stringTriple = "<top-song xmlns=\"http://marklogic.com/MLU/top-songs\"> <!--Copyright (c) 2010 Mark Logic Corporation. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published bythe Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled \"GNU Free Documentation License.\" Content derived from http://en.wikipedia.org/w/index.php?title=Blue_Champagne_(song)&action=edit&redlink=1 Modified in February 2010 by Mark Logic Corporation under the terms of the GNU Free Documentation License.--> <title href=\"http://en.wikipedia.org/w/index.php?title=Blue_Champagne_(song)&amp;action=edit&amp;redlink=1\" xmlns:ts=\"http://marklogic.com/MLU/top-songs\">Blue Champagne</title> <artist xmlns:ts=\"http://marklogic.com/MLU/top-songs\"/> <weeks last=\"1941-09-27\"> <week>1941-09-27</week> </weeks> <descr/></top-song>";
167170
stringHandle = new StringHandle(stringTriple);

marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/datamovement/functionaltests/WriteBatcherJobReportTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ public static void setUpBeforeClass() throws Exception {
9595
createRESTServerWithDB(server, port);
9696

9797
associateRESTServerWithDB(server, dbName);
98+
if (IsSecurityEnabled()) {
99+
enableSecurityOnRESTServer(server, dbName);
100+
}
98101

99102
dbClient = getDatabaseClient(user, password, Authentication.DIGEST);
100103
DatabaseClient adminClient = DatabaseClientFactory.newClient(host, 8000, user, password, Authentication.DIGEST);

marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/datamovement/functionaltests/WriteHostBatcherTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,9 @@ public static void setUpBeforeClass() throws Exception {
168168
// Create App Server if needed.
169169
createRESTServerWithDB(server, port);
170170
assocRESTServer(server, dbName, port);
171+
if (IsSecurityEnabled()) {
172+
enableSecurityOnRESTServer(server, dbName);
173+
}
171174

172175
dbClient = getDatabaseClient(user, password, Authentication.DIGEST);
173176
DatabaseClient adminClient = DatabaseClientFactory.newClient(host, 8000, user, password, Authentication.DIGEST);

0 commit comments

Comments
 (0)