Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Commit b41df7b

Browse files
committed
#432 Fixes for amp tests
1 parent 0923bce commit b41df7b

File tree

8 files changed

+21
-32
lines changed

8 files changed

+21
-32
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ target
1616
gradle-local.properties
1717
snyk
1818
.vscode
19+
src/test/resources/sample-app/build

src/test/java/com/marklogic/appdeployer/command/forests/BuildForestReplicaTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,11 @@ public void hostIsAdded() {
179179
assertEquals(1, forests.size());
180180
assertEquals("testdb-4-replica-1", forests.get(0).getForestReplica().get(0).getReplicaName());
181181
assertEquals(
182+
"host1", forests.get(0).getForestReplica().get(0).getHost(),
182183
"When adding a new host and creating replicas, the replicas will naturally be uneven because the existing " +
183184
"forests on hosts 1, 2, and 3 won't have their replicas moved to 4 automatically, and thus host 4 won't " +
184-
"have any replicas on it. And for the new replicas, we expect those to start being created on the first host.",
185-
"host1", forests.get(0).getForestReplica().get(0).getHost());
185+
"have any replicas on it. And for the new replicas, we expect those to start being created on the first host."
186+
);
186187
}
187188

188189
@Test

src/test/java/com/marklogic/appdeployer/command/security/ManageAmpsTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.marklogic.appdeployer.command.security;
22

3+
import com.marklogic.appdeployer.ConfigDir;
34
import com.marklogic.appdeployer.command.AbstractManageResourceTest;
45
import com.marklogic.appdeployer.command.Command;
56
import com.marklogic.appdeployer.command.modules.LoadModulesCommand;
@@ -12,12 +13,16 @@
1213
import com.marklogic.mgmt.resource.security.AmpManager;
1314
import org.junit.jupiter.api.Test;
1415

16+
import java.io.File;
17+
1518
import static org.junit.jupiter.api.Assertions.*;
1619

1720
public class ManageAmpsTest extends AbstractManageResourceTest {
1821

1922
@Test
2023
public void ampLoadedBeforeModules() {
24+
appConfig.setConfigDir(new ConfigDir(new File("src/test/resources/sample-app/real-amp")));
25+
2126
initializeAppDeployer(new DeployUsersCommand(), new DeployRestApiServersCommand(true),
2227
new DeployAmpsCommand(), new LoadModulesCommand());
2328
appConfig.setModuleTimestampsPath(null);

src/test/resources/sample-app/build/ml-javaclient-util/module-timestamps.properties

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/test/resources/sample-app/build/mlRestApi/some-library/ml-modules/ext/some-lib.xqy

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/test/resources/sample-app/build/mlRestApi/some-library/ml-modules/services/echo.xqy

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"namespace": "urn:sampleapp",
3+
"local-name": "get-host-status",
4+
"document-uri": "/ext/sample-lib.xqy",
5+
"modules-database": "%%MODULES_DATABASE%%",
6+
"role": ["admin"]
7+
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"namespace": "urn:sampleapp",
3-
"local-name": "get-host-status",
4-
"document-uri": "/ext/sample-lib.xqy",
5-
"modules-database": "%%MODULES_DATABASE%%",
6-
"role": ["admin"]
2+
"namespace": "http://example.com/uri",
3+
"local-name": "ml-app-deployer-test-1",
4+
"document-uri": "/module/path/name",
5+
"modules-database": "Modules",
6+
"role": ["app-user"]
77
}

0 commit comments

Comments
 (0)