-
Notifications
You must be signed in to change notification settings - Fork 461
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#24093 Working on the migration task to populate missing contentlet a…
…s JSON data
- Loading branch information
1 parent
87ee138
commit 5aa3a75
Showing
3 changed files
with
147 additions
and
61 deletions.
There are no files selected for viewing
31 changes: 29 additions & 2 deletions
31
.../integration-test/java/com/dotcms/util/content/json/PopulateContentletAsJSONUtilTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,44 @@ | ||
package com.dotcms.util.content.json; | ||
|
||
import com.dotcms.IntegrationTestBase; | ||
import com.dotcms.util.IntegrationTestInitService; | ||
import com.dotmarketing.exception.DotDataException; | ||
import org.apache.felix.framework.OSGIUtil; | ||
import org.junit.AfterClass; | ||
import org.junit.BeforeClass; | ||
import org.junit.Test; | ||
|
||
import java.io.IOException; | ||
import java.sql.SQLException; | ||
|
||
public class PopulateContentletAsJSONUtilTest extends IntegrationTestBase { | ||
|
||
@BeforeClass | ||
public static void prepare() throws Exception { | ||
//Setting web app environment | ||
IntegrationTestInitService.getInstance().init(); | ||
|
||
if (!OSGIUtil.getInstance().isInitialized()) { | ||
OSGIUtil.getInstance().initializeFramework(); | ||
} | ||
} | ||
|
||
@Test | ||
public void Test_Run() throws SQLException, DotDataException, IOException { | ||
PopulateContentletAsJSONUtil.getInstance().populate("Host"); | ||
public void Test_populate_host() throws SQLException, DotDataException, IOException { | ||
PopulateContentletAsJSONUtil.getInstance().populateForAssetSubType("Host"); | ||
} | ||
|
||
@Test | ||
public void Test_populate_All_excluding_host() throws SQLException, DotDataException, IOException { | ||
PopulateContentletAsJSONUtil.getInstance().populateExcludingAssetSubType("Host"); | ||
} | ||
|
||
/** | ||
* Remove the content type and workflows created | ||
*/ | ||
@AfterClass | ||
public static void cleanup() { | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters