From f14fdb52aeb427fee680fe37581fa7f29d0c1f25 Mon Sep 17 00:00:00 2001 From: yashkohli88 Date: Wed, 8 Jan 2025 20:10:08 +0530 Subject: [PATCH] Refactored code for better performance --- .../test/integration/e2e-test-service/originsTest.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/integration/test/integration/e2e-test-service/originsTest.js b/tools/integration/test/integration/e2e-test-service/originsTest.js index 3d302d8..5fd6386 100644 --- a/tools/integration/test/integration/e2e-test-service/originsTest.js +++ b/tools/integration/test/integration/e2e-test-service/originsTest.js @@ -65,9 +65,8 @@ function isOriginWithRevisionsAllowed(coordinate) { function getProviderType(type, provider) { switch (type) { case 'git': - return 'github' case 'gem': - return 'rubygems' + return provider case 'conda': return `conda/${provider}` case 'maven': @@ -104,10 +103,10 @@ async function compareEndpoints(endpoint) { async function compareOriginsWithRevisions(coordinates) { const originUrl = buildOriginUrl(coordinates) - compareEndpoints(`${originUrl}/revisions`) + await compareEndpoints(`${originUrl}/revisions`) } async function compareOrigins(coordinates) { const originUrl = coordinates.startsWith('conda/') ? buildCondaUrl(coordinates) : buildOriginUrl(coordinates) - compareEndpoints(`${originUrl}`) + await compareEndpoints(`${originUrl}`) }