Skip to content

Commit f865ec4

Browse files
committed
skip
1 parent 636aa9c commit f865ec4

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

test/environment/setup.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,14 @@ const API_KEY_USER_ENDPOINT = '/builtin-users/dataverseAdmin/api-token'
1515
const API_KEY_USER_PASSWORD = 'admin1'
1616

1717
export default async function setupTestEnvironment(): Promise<void> {
18-
await setupContainers()
18+
await setupContainers() //Set skipContainers to true to skip container setup and run tests against an already running instance
1919
await setupApiKey()
2020
}
2121

22-
async function setupContainers(): Promise<void> {
22+
async function setupContainers(skipContainers?: boolean): Promise<void> {
23+
if (skipContainers) {
24+
return
25+
}
2326
console.log('Cleaning up old container volumes...')
2427
fs.rmSync(`${__dirname}/docker-dev-volumes`, { recursive: true, force: true })
2528
console.log('Running test containers...')
@@ -45,4 +48,4 @@ async function setupApiKey(): Promise<void> {
4548
console.error('Tests setup: Error while obtaining API key')
4649
})
4750
console.log('API key obtained')
48-
}
51+
}

0 commit comments

Comments
 (0)