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

Commit 802fb0a

Browse files
committed
#248 Mimetypes and groups are undeployed before users
1 parent d9579e1 commit 802fb0a

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,9 @@ public abstract class SortOrderConstants {
6565
public static Integer DEPLOY_FOREST_REPLICAS = 1200;
6666

6767
// Undo constants
68-
public static Integer DELETE_GROUPS = 10000;
69-
70-
public static Integer DELETE_MIMETYPES = 9500;
7168

7269
public static Integer DELETE_USERS = 9000;
7370
public static Integer DELETE_CERTIFICATE_TEMPLATES = 9010;
74-
public static Integer DELETE_CERTIFICATE_AUTHORITIES = 9020;
7571
public static Integer DELETE_EXTERNAL_SECURITY = 9030;
7672
public static Integer DELETE_PROTECTED_COLLECTIONS = 9040;
7773
public static Integer DELETE_QUERY_ROLESETS = 9050;
@@ -82,7 +78,11 @@ public abstract class SortOrderConstants {
8278
// Protected paths reference roles
8379
public static Integer DELETE_PROTECTED_PATHS = 9080;
8480

85-
/*
81+
public static Integer DELETE_GROUPS = 8600;
82+
83+
public static Integer DELETE_MIMETYPES = 8500;
84+
85+
/*
8686
* This executes before databases are deleted, as deleting databases normally deletes the primary forests, so we
8787
* need to make sure the replicas are deleted first.
8888
*/
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.marklogic.appdeployer.command;
2+
3+
import org.junit.Assert;
4+
import org.junit.Test;
5+
6+
public class SortOrderConstantsTest extends Assert {
7+
8+
@Test
9+
public void undeployMimetypesBeforeUsers() {
10+
assertTrue("Mimetypes need to be undeployed before users since the user doing the deleting may be deleted when users are undeployed",
11+
SortOrderConstants.DELETE_MIMETYPES < SortOrderConstants.DELETE_USERS);
12+
}
13+
}

0 commit comments

Comments
 (0)