fix: Display result in tabular format for action response in imported app for SQL datasource (#7889)
* Added pluginId to nested datasource object within actionDTO * Added check in TC for plugin id
This commit is contained in:
parent
5c3e4ba715
commit
0729ab3211
|
|
@ -723,10 +723,13 @@ public class ImportExportApplicationService {
|
|||
//Mapping ds name in id field
|
||||
ds.setId(datasourceMap.get(ds.getId()));
|
||||
ds.setOrganizationId(null);
|
||||
ds.setPluginId(null);
|
||||
if (ds.getPluginId() != null) {
|
||||
ds.setPluginId(pluginMap.get(ds.getPluginId()));
|
||||
}
|
||||
return ds.getId();
|
||||
} else {
|
||||
// This means we don't have regular datasource it can be simple REST_API
|
||||
// This means we don't have regular datasource it can be simple REST_API and will also be used when
|
||||
// importing the action to populate the data
|
||||
ds.setOrganizationId(organizationId);
|
||||
ds.setPluginId(pluginMap.get(ds.getPluginId()));
|
||||
return "";
|
||||
|
|
|
|||
|
|
@ -384,8 +384,9 @@ public class ImportExportApplicationServiceTests {
|
|||
assertThat(validAction.getOrganizationId()).isNull();
|
||||
assertThat(validAction.getPolicies()).isNull();
|
||||
assertThat(validAction.getId()).isNotNull();
|
||||
assertThat(validAction.getUnpublishedAction().getPageId())
|
||||
.isEqualTo(defaultPage.getUnpublishedPage().getName());
|
||||
ActionDTO unpublishedAction = validAction.getUnpublishedAction();
|
||||
assertThat(unpublishedAction.getPageId()).isEqualTo(defaultPage.getUnpublishedPage().getName());
|
||||
assertThat(unpublishedAction.getDatasource().getPluginId()).isEqualTo(installedPlugin.getPackageName());
|
||||
|
||||
assertThat(datasourceList).hasSize(1);
|
||||
Datasource datasource = datasourceList.get(0);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user