mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-18 23:49:20 +01:00
Rename files
This commit is contained in:
32
ts/test-mock/calling/helpers.node.ts
Normal file
32
ts/test-mock/calling/helpers.node.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
// Copyright 2025 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import * as child from 'node:child_process';
|
||||
import createDebug from 'debug';
|
||||
|
||||
const debug = createDebug('mock:test:calling:helpers');
|
||||
|
||||
export function runTurnInContainer(): void {
|
||||
tearDownTurnContainer();
|
||||
const result = child.spawnSync('docker', [
|
||||
'run',
|
||||
'--name',
|
||||
'coturn',
|
||||
'-d',
|
||||
'--network=host',
|
||||
'coturn/coturn',
|
||||
]);
|
||||
debug(
|
||||
'create coturn: signal: ',
|
||||
result.signal,
|
||||
' status: ',
|
||||
result.status,
|
||||
'stderr: ',
|
||||
result.stderr?.toString()
|
||||
);
|
||||
}
|
||||
|
||||
export function tearDownTurnContainer(): void {
|
||||
debug('tearDownTurnContainer');
|
||||
child.spawnSync('docker', ['rm', '--force', '--volumes', 'coturn']);
|
||||
}
|
||||
Reference in New Issue
Block a user