[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:
siva kumar
2021-01-06 17:26:24 +05:30
committed by GitHub
parent 1f8082d8e1
commit 09b4df5af7
8 changed files with 413 additions and 0 deletions

View 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 {};
}
}
}