mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACA-4227] [APS] Create a script to check Process Services Management plugin status before running e2e tests (#6486)
* [ACA-4227] Create a generic script to check plugin status before running e2e tests by plugin name * * Added governace env check * * Added AAE plugin check * * Updated script * small improvements, add uiName parameter for the command * * Fixed comments * * Moved check-plugin script in the common place * * Added table format to show plugin status Co-authored-by: adomi <ardit.domi@alfresco.com>
This commit is contained in:
44
lib/cli/scripts/plugins/plugin-config.ts
Normal file
44
lib/cli/scripts/plugins/plugin-config.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
import { PluginInterface } from './plugin-model';
|
||||
import { logger } from '../logger';
|
||||
|
||||
export class PluginConfiguration {
|
||||
constructor(
|
||||
private plugInInfo: PluginInterface,
|
||||
private alfrescoJsApi: any
|
||||
) {}
|
||||
|
||||
async getAppConfig(url: string) {
|
||||
return this.callCustomApi(url);
|
||||
}
|
||||
|
||||
async callCustomApi(url: string) {
|
||||
const pathParams = {},
|
||||
headerParams = {},
|
||||
formParams = {},
|
||||
bodyParam = {},
|
||||
queryParams = {},
|
||||
contentTypes = ['application/json'],
|
||||
accepts = ['application/json'];
|
||||
try {
|
||||
const response = await this.alfrescoJsApi.oauth2Auth.callCustomApi(
|
||||
url,
|
||||
'GET',
|
||||
pathParams,
|
||||
queryParams,
|
||||
headerParams,
|
||||
formParams,
|
||||
bodyParam,
|
||||
contentTypes,
|
||||
accepts
|
||||
);
|
||||
|
||||
return response;
|
||||
} catch (error) {
|
||||
logger.error(
|
||||
`${this.plugInInfo.host} is not reachable error: `,
|
||||
error
|
||||
);
|
||||
return {};
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user