fix simpleapp and check-activiti script

This commit is contained in:
Eugenio Romano 2019-07-16 12:03:54 +01:00
parent 7791205077
commit e2311ab045
3 changed files with 13 additions and 5 deletions

View File

@ -52,6 +52,8 @@ describe('FileUploadingDialogComponent', () => {
userPreferenceService = TestBed.get(UserPreferencesService); userPreferenceService = TestBed.get(UserPreferencesService);
uploadService.clearQueue(); uploadService.clearQueue();
spyOn(uploadService, 'uploadFilesInTheQueue').and.callFake(() => {});
emitter = new EventEmitter(); emitter = new EventEmitter();
fileList = [ fileList = [
new FileModel(<File> { name: 'fake-name', size: 10 }), new FileModel(<File> { name: 'fake-name', size: 10 }),

View File

@ -243,14 +243,20 @@ async function checkIfAppIsReleased(apiService, absentApps) {
appRelease = await releaseApp(apiService, app); appRelease = await releaseApp(apiService, app);
} else { } else {
console.log('Not Need to release'); console.log('Not Need to release' + JSON.stringify(appReleaseList));
appRelease = appReleaseList.list.entries.find((currentRelease) => { let currentReleaseVersion = -1;
return currentRelease.entry.version === 'latest';
appReleaseList.list.entries.forEach((currentRelease) => {
if (currentRelease.entry.version > currentReleaseVersion) {
currentReleaseVersion = currentRelease.entry.version;
appRelease = currentRelease;
}
}); });
} }
console.log('App to deploy app release id ' + appRelease.entry.id); console.log('App to deploy app release id ' + JSON.stringify(appRelease));
await deployApp(apiService, appRelease, currentAbsentApp.name); await deployApp(apiService, appRelease, currentAbsentApp.name);
sleep(120000);///wait to not fail sleep(120000);///wait to not fail
@ -347,7 +353,7 @@ async function releaseApp(apiService, app) {
return await apiService.oauth2Auth.callCustomApi(url, 'POST', pathParams, queryParams, headerParams, formParams, bodyParam, return await apiService.oauth2Auth.callCustomApi(url, 'POST', pathParams, queryParams, headerParams, formParams, bodyParam,
contentTypes, accepts); contentTypes, accepts);
} catch (error) { } catch (error) {
console.log(`Not possible to release the project ${app.entry.name} status : $ ${JSON.stringify(error.status)} ${JSON.stringify(error.response.text)}`); console.log(`Not possible to release the project ${app.entry.name} status : $ \n ${JSON.stringify(error.status)} \n ${JSON.stringify(error.response.text)}`);
process.exit(1); process.exit(1);
} }