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

Commit f218b4e

Browse files
author
Rob Rudin
committed
#134 Ensuring filenamesToIgnore is always set correctly
1 parent 6b2ff5a commit f218b4e

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

src/main/java/com/marklogic/appdeployer/command/AbstractCommand.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public void setFilenamesToIgnore(String... filenames) {
5252
for (String f : filenames) {
5353
set.add(f);
5454
}
55+
rff.setFilenamesToIgnore(set);
5556
} else {
5657
this.resourceFilenameFilter = new ResourceFilenameFilter(filenames);
5758
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.marklogic.appdeployer.command.security;
2+
3+
import com.marklogic.appdeployer.AbstractAppDeployerTest;
4+
import com.marklogic.mgmt.security.RoleManager;
5+
import org.junit.Test;
6+
7+
public class IgnoreRoleTest extends AbstractAppDeployerTest {
8+
9+
@Test
10+
public void test() {
11+
DeployRolesCommand command = new DeployRolesCommand();
12+
command.setFilenamesToIgnore("sample-app-role2.xml");
13+
initializeAppDeployer(command);
14+
appDeployer.deploy(appConfig);
15+
16+
try {
17+
RoleManager mgr = new RoleManager(manageClient);
18+
assertTrue(mgr.exists("sample-app-role1"));
19+
assertFalse("Role should not have been created because its resource file was ignored", mgr.exists("sample-app-role2"));
20+
} finally {
21+
undeploySampleApp();
22+
}
23+
}
24+
}

0 commit comments

Comments
 (0)