diff --git a/src/lib/api/group/index.ts b/src/lib/api/group/index.ts index e52f8d9c..1f040afa 100644 --- a/src/lib/api/group/index.ts +++ b/src/lib/api/group/index.ts @@ -32,14 +32,16 @@ export async function createOrg( } const body: { name: string; + groupId: string; sourceOrgId?: string; } = { name, + groupId, sourceOrgId, }; const res = await requestManager.request({ verb: 'post', - url: `/group/${groupId}/org`, + url: `/org`, body: JSON.stringify(body), }); const statusCode = res.statusCode || res.status; @@ -80,7 +82,8 @@ export async function listOrgs( const statusCode = res.statusCode || res.status; if (!statusCode || statusCode !== 200) { throw new Error( - 'Expected a 200 response, instead received: ' + JSON.stringify({statusCode, data: res.data}), + 'Expected a 200 response, instead received: ' + + JSON.stringify({ statusCode, data: res.data }), ); } diff --git a/test/scripts/import-projects.test.ts b/test/scripts/import-projects.test.ts index dcc352d7..609a8610 100644 --- a/test/scripts/import-projects.test.ts +++ b/test/scripts/import-projects.test.ts @@ -25,7 +25,7 @@ describe('Import projects script', () => { await deleteTestProjects(ORG_ID, discoveredProjects); await deleteFiles(logs); process.env = { ...OLD_ENV }; - }, 5000); + }, 10000); it('succeeds to import targets from file', async () => { const logFiles = generateLogsPaths(__dirname, ORG_ID); @@ -88,7 +88,7 @@ describe('Skips & logs issues', () => { afterEach(async () => { await deleteFiles(logs); process.env = { ...OLD_ENV }; - }, 1000); + }, 10000); afterAll(async () => { await deleteTestProjects(ORG_ID, discoveredProjects); @@ -204,7 +204,7 @@ describe('Error handling', () => { afterAll(async () => { process.env = { ...OLD_ENV }; - }, 1000); + }, 10000); it('shows correct error when input can not be loaded', async () => { expect( @@ -247,7 +247,7 @@ describe('No projects scenarios', () => { await deleteTestProjects(ORG_ID, discoveredProjects); await deleteFiles(logs); process.env = { ...OLD_ENV }; - }); + }, 10000); it('succeeds to complete import targets from empty repo', async () => { const testName = 'empty-target'; const logPath = path.resolve(__dirname + '/fixtures/' + testName);