refactor: migrate coretraffic to current smartproxy
This commit is contained in:
+6
-2
@@ -1,11 +1,12 @@
|
||||
delete process.env.CLI_CALL;
|
||||
import * as coretraffic from '../ts/index.js';
|
||||
|
||||
import { tap, expect } from '@push.rocks/tapbundle';
|
||||
import { tap, expect } from '@git.zone/tstest/tapbundle';
|
||||
import { Qenv } from '@push.rocks/qenv';
|
||||
|
||||
const testQenv = new Qenv('./', './.nogit');
|
||||
let testCoreTraffic: coretraffic.CoreTraffic;
|
||||
const shouldRunIntegrationTests = process.env.CORETRAFFIC_INTEGRATION_TESTS === 'true';
|
||||
|
||||
tap.test('should create an coretraffic instance', async (tools) => {
|
||||
testCoreTraffic = new coretraffic.CoreTraffic();
|
||||
@@ -13,15 +14,18 @@ tap.test('should create an coretraffic instance', async (tools) => {
|
||||
});
|
||||
|
||||
tap.test('should start the instance', async (tools) => {
|
||||
tools.skipIf(!shouldRunIntegrationTests, 'set CORETRAFFIC_INTEGRATION_TESTS=true to start CoreTraffic');
|
||||
await testCoreTraffic.start();
|
||||
});
|
||||
|
||||
tap.test('should keep the instance alive', async (tools) => {
|
||||
tools.skipIf(!shouldRunIntegrationTests, 'set CORETRAFFIC_INTEGRATION_TESTS=true to keep CoreTraffic alive');
|
||||
await tools.delayFor(10000);
|
||||
});
|
||||
|
||||
tap.test('should stop the instance', async (tools) => {
|
||||
tools.skipIf(!shouldRunIntegrationTests, 'set CORETRAFFIC_INTEGRATION_TESTS=true to stop CoreTraffic');
|
||||
await testCoreTraffic.stop();
|
||||
});
|
||||
|
||||
tap.start();
|
||||
export default tap.start();
|
||||
|
||||
Reference in New Issue
Block a user