Skip to content

Commit e3a855a

Browse files
MrJohn1911brianchandotcom
authored andcommitted
LPD-84165 test: add test to validate changes
1 parent 1e36c54 commit e3a855a

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

modules/dxp/apps/ai-hub/ai-hub-rest-test/src/testIntegration/java/com/liferay/ai/hub/rest/resource/v1_0/test/ContentRetrieverResourceTest.java

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,21 @@ public static void tearDownClass() {
106106
ServiceContextThreadLocal.popServiceContext();
107107
}
108108

109+
@Override
110+
@Test
111+
public void testDeleteContentRetrieverByExternalReferenceCode()
112+
throws Exception {
113+
114+
super.testDeleteContentRetrieverByExternalReferenceCode();
115+
116+
IndicesExistsIndexResponse indicesExistsIndexResponse =
117+
_searchEngineAdapter.execute(
118+
new IndicesExistsIndexRequest(
119+
_contentRetriever.getIndexName()));
120+
121+
Assert.assertFalse(indicesExistsIndexResponse.isExists());
122+
}
123+
109124
@Override
110125
@Test
111126
public void testPostContentRetriever() throws Exception {
@@ -128,6 +143,17 @@ public void testPostContentRetriever() throws Exception {
128143
Assert.assertTrue(indicesExistsIndexResponse.isExists());
129144
}
130145

146+
@Override
147+
protected ContentRetriever
148+
testDeleteContentRetrieverByExternalReferenceCode_addContentRetriever()
149+
throws Exception {
150+
151+
_contentRetriever = contentRetrieverResource.postContentRetriever(
152+
randomContentRetriever());
153+
154+
return _contentRetriever;
155+
}
156+
131157
@Inject
132158
private static AccountEntryLocalService _accountEntryLocalService;
133159

@@ -146,6 +172,8 @@ public void testPostContentRetriever() throws Exception {
146172
@Inject
147173
private static SiteInitializerRegistry _siteInitializerRegistry;
148174

175+
private ContentRetriever _contentRetriever;
176+
149177
@Inject
150178
private ObjectDefinitionLocalService _objectDefinitionLocalService;
151179

0 commit comments

Comments
 (0)