Skip to content

Commit

Permalink
Remove unlink since it's covered by temp + make tests work with Node …
Browse files Browse the repository at this point in the history
…16 (#541)
  • Loading branch information
tovbinm authored Jun 18, 2022
1 parent 1c503d5 commit ca4ef31
Show file tree
Hide file tree
Showing 38 changed files with 207 additions and 290 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {AirbyteLog, AirbyteLogLevel} from 'faros-airbyte-cdk';
import fs from 'fs';
import _ from 'lodash';
import {getLocal} from 'mockttp';
import pino from 'pino';
Expand All @@ -26,7 +25,6 @@ describe('agileaccelerator', () => {

afterEach(async () => {
await mockttp.stop();
fs.unlinkSync(configPath);
});

test('process records from all streams', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ describe('asana', () => {

afterEach(async () => {
await mockttp.stop();
fs.unlinkSync(configPath);
});

test('process and write records', async () => {
Expand Down Expand Up @@ -166,7 +165,6 @@ describe('asana', () => {
});

test('fail to process bad records when strategy is FAIL', async () => {
fs.unlinkSync(configPath);
configPath = await tempConfig(mockttp.url, InvalidRecordStrategy.FAIL);
const cli = await CLI.runWith([
'write',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {AirbyteLog, AirbyteLogLevel} from 'faros-airbyte-cdk';
import fs from 'fs';
import _ from 'lodash';
import {getLocal} from 'mockttp';
import pino from 'pino';
Expand All @@ -26,7 +25,6 @@ describe('azure-repos', () => {

afterEach(async () => {
await mockttp.stop();
fs.unlinkSync(configPath);
});

test('process records from all streams', async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {AirbyteLog, AirbyteLogLevel} from 'faros-airbyte-cdk';
import fs from 'fs';
import _ from 'lodash';
import {getLocal} from 'mockttp';
import pino from 'pino';
Expand All @@ -26,7 +25,6 @@ describe('azureactivedirectory', () => {

afterEach(async () => {
await mockttp.stop();
fs.unlinkSync(configPath);
});

test('process records from all streams', async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {AirbyteLog, AirbyteLogLevel} from 'faros-airbyte-cdk';
import fs from 'fs';
import _ from 'lodash';
import {getLocal} from 'mockttp';
import pino from 'pino';
Expand All @@ -26,7 +25,6 @@ describe('azurepipeline', () => {

afterEach(async () => {
await mockttp.stop();
fs.unlinkSync(configPath);
});

test('process records from all streams', async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {AirbyteLog, AirbyteLogLevel} from 'faros-airbyte-cdk';
import fs from 'fs';
import _ from 'lodash';
import {getLocal} from 'mockttp';
import pino from 'pino';
Expand All @@ -26,7 +25,6 @@ describe('backlog', () => {

afterEach(async () => {
await mockttp.stop();
fs.unlinkSync(configPath);
});

test('process records from all streams', async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {AirbyteLog, AirbyteLogLevel} from 'faros-airbyte-cdk';
import fs from 'fs';
import _ from 'lodash';
import {getLocal} from 'mockttp';
import pino from 'pino';
Expand All @@ -26,7 +25,6 @@ describe('bamboohr', () => {

afterEach(async () => {
await mockttp.stop();
fs.unlinkSync(configPath);
});

test('process records from all streams', async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {AirbyteLog, AirbyteLogLevel} from 'faros-airbyte-cdk';
import fs from 'fs';
import _ from 'lodash';
import {getLocal} from 'mockttp';
import pino from 'pino';
Expand All @@ -26,7 +25,6 @@ describe('bitbucket', () => {

afterEach(async () => {
await mockttp.stop();
fs.unlinkSync(configPath);
});

test('process records from all streams', async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {AirbyteLog, AirbyteLogLevel} from 'faros-airbyte-cdk';
import fs from 'fs';
import _ from 'lodash';
import {getLocal} from 'mockttp';
import pino from 'pino';
Expand All @@ -26,7 +25,6 @@ describe('buildkite', () => {

afterEach(async () => {
await mockttp.stop();
fs.unlinkSync(configPath);
});

test('process records from all streams', async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {AirbyteLog, AirbyteLogLevel} from 'faros-airbyte-cdk';
import fs from 'fs';
import _ from 'lodash';
import {getLocal} from 'mockttp';
import pino from 'pino';
Expand All @@ -26,7 +25,6 @@ describe('circleci', () => {

afterEach(async () => {
await mockttp.stop();
fs.unlinkSync(configPath);
});

test('process records from all streams', async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {AirbyteLog, AirbyteLogLevel} from 'faros-airbyte-cdk';
import fs from 'fs';
import _ from 'lodash';
import {getLocal, MockedEndpoint} from 'mockttp';
import pino from 'pino';
Expand Down Expand Up @@ -46,7 +45,6 @@ describe('datadog', () => {

afterEach(async () => {
await mockttp.stop();
fs.unlinkSync(configPath);
});

test('process records from all streams', async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {AirbyteLog, AirbyteLogLevel} from 'faros-airbyte-cdk';
import fs from 'fs';
import _ from 'lodash';
import {getLocal} from 'mockttp';
import pino from 'pino';
Expand Down Expand Up @@ -35,7 +34,6 @@ describe('docker', () => {

afterEach(async () => {
await mockttp.stop();
fs.unlinkSync(configPath);
});

test('process records from all streams', async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {AirbyteLog, AirbyteLogLevel} from 'faros-airbyte-cdk';
import fs from 'fs';
import _ from 'lodash';
import {getLocal} from 'mockttp';
import pino from 'pino';
Expand All @@ -26,7 +25,6 @@ describe('faros_feeds', () => {

afterEach(async () => {
await mockttp.stop();
fs.unlinkSync(configPath);
});

test('process records from all streams', async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {AirbyteLog, AirbyteLogLevel} from 'faros-airbyte-cdk';
import fs from 'fs';
import _ from 'lodash';
import {getLocal, MockedEndpoint} from 'mockttp';
import pino from 'pino';
Expand Down Expand Up @@ -39,7 +38,6 @@ describe('firehydrant', () => {

afterEach(async () => {
await mockttp.stop();
fs.unlinkSync(configPath);
});

test('process records from all streams', async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {AirbyteLog, AirbyteLogLevel, AirbyteRecord} from 'faros-airbyte-cdk';
import fs from 'fs';
import _ from 'lodash';
import {getLocal} from 'mockttp';
import os from 'os';
Expand Down Expand Up @@ -31,7 +30,6 @@ describe('github', () => {

afterEach(async () => {
await mockttp.stop();
fs.unlinkSync(configPath);
});

test('process and write records', async () => {
Expand Down Expand Up @@ -166,7 +164,6 @@ describe('github', () => {
});

test('fail to process bad records when strategy is FAIL', async () => {
fs.unlinkSync(configPath);
configPath = await tempConfig(mockttp.url, InvalidRecordStrategy.FAIL);
const cli = await CLI.runWith([
'write',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {AirbyteLog, AirbyteLogLevel, AirbyteRecord} from 'faros-airbyte-cdk';
import fs from 'fs';
import _ from 'lodash';
import {getLocal} from 'mockttp';
import os from 'os';
Expand Down Expand Up @@ -31,7 +30,6 @@ describe('gitlab-ci', () => {

afterEach(async () => {
await mockttp.stop();
fs.unlinkSync(configPath);
});

test('process and write records', async () => {
Expand Down Expand Up @@ -166,7 +164,6 @@ describe('gitlab-ci', () => {
});

test('fail to process bad records when strategy is FAIL', async () => {
fs.unlinkSync(configPath);
configPath = await tempConfig(mockttp.url, InvalidRecordStrategy.FAIL);
const cli = await CLI.runWith([
'write',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {AirbyteLog, AirbyteLogLevel, AirbyteRecord} from 'faros-airbyte-cdk';
import fs from 'fs';
import _ from 'lodash';
import {getLocal} from 'mockttp';
import os from 'os';
Expand Down Expand Up @@ -31,7 +30,6 @@ describe('gitlab', () => {

afterEach(async () => {
await mockttp.stop();
fs.unlinkSync(configPath);
});

test('process and write records', async () => {
Expand Down Expand Up @@ -166,7 +164,6 @@ describe('gitlab', () => {
});

test('fail to process bad records when strategy is FAIL', async () => {
fs.unlinkSync(configPath);
configPath = await tempConfig(mockttp.url, InvalidRecordStrategy.FAIL);
const cli = await CLI.runWith([
'write',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {AirbyteLog, AirbyteLogLevel} from 'faros-airbyte-cdk';
import fs from 'fs';
import _ from 'lodash';
import {getLocal} from 'mockttp';
import pino from 'pino';
Expand Down Expand Up @@ -51,7 +50,6 @@ describe('googlecalendar', () => {

afterEach(async () => {
await mockttp.stop();
fs.unlinkSync(configPath);
});

test('process records from all streams', async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {AirbyteLog, AirbyteLogLevel, AirbyteRecord} from 'faros-airbyte-cdk';
import fs from 'fs';
import _ from 'lodash';
import {getLocal} from 'mockttp';
import os from 'os';
Expand Down Expand Up @@ -28,7 +27,6 @@ describe('harness', () => {

afterEach(async () => {
await mockttp.stop();
fs.unlinkSync(configPath);
});

test('skip to process bad records when strategy is SKIP', async () => {
Expand Down Expand Up @@ -64,7 +62,6 @@ describe('harness', () => {
});

test('fail to process bad records when strategy is FAIL', async () => {
fs.unlinkSync(configPath);
configPath = await tempConfig(mockttp.url, InvalidRecordStrategy.FAIL);
const cli = await CLI.runWith([
'write',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {AirbyteLog, AirbyteLogLevel, AirbyteRecord} from 'faros-airbyte-cdk';
import fs from 'fs';
import _ from 'lodash';
import {getLocal} from 'mockttp';
import os from 'os';
Expand Down Expand Up @@ -30,7 +29,6 @@ describe('jenkins', () => {

afterEach(async () => {
await mockttp.stop();
fs.unlinkSync(configPath);
});

test('process and write records', async () => {
Expand Down Expand Up @@ -145,7 +143,6 @@ describe('jenkins', () => {
});

test('fail to process bad records when strategy is FAIL', async () => {
fs.unlinkSync(configPath);
configPath = await tempConfig(mockttp.url, InvalidRecordStrategy.FAIL);
const cli = await CLI.runWith([
'write',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ describe('jira', () => {

afterEach(async () => {
await mockttp.stop();
fs.unlinkSync(configPath);
});

test('check valid jira source config', async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {AirbyteLog, AirbyteLogLevel} from 'faros-airbyte-cdk';
import fs from 'fs';
import _ from 'lodash';
import {getLocal, MockedEndpoint} from 'mockttp';
import pino from 'pino';
Expand Down Expand Up @@ -39,7 +38,6 @@ describe('okta', () => {

afterEach(async () => {
await mockttp.stop();
fs.unlinkSync(configPath);
});

test('process records from all streams', async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {AirbyteLog, AirbyteLogLevel} from 'faros-airbyte-cdk';
import fs from 'fs';
import _ from 'lodash';
import {getLocal, MockedEndpoint} from 'mockttp';
import pino from 'pino';
Expand Down Expand Up @@ -39,7 +38,6 @@ describe('opsgenie', () => {

afterEach(async () => {
await mockttp.stop();
fs.unlinkSync(configPath);
});

test('process records from all streams', async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {AirbyteLog, AirbyteLogLevel, AirbyteRecord} from 'faros-airbyte-cdk';
import fs from 'fs';
import _ from 'lodash';
import {getLocal} from 'mockttp';
import os from 'os';
Expand Down Expand Up @@ -30,7 +29,6 @@ describe('pagerduty', () => {

afterEach(async () => {
await mockttp.stop();
fs.unlinkSync(configPath);
});

test('process and write records', async () => {
Expand Down Expand Up @@ -144,7 +142,6 @@ describe('pagerduty', () => {
});

test('fail to process bad records when strategy is FAIL', async () => {
fs.unlinkSync(configPath);
configPath = await tempConfig(mockttp.url, InvalidRecordStrategy.FAIL);
const cli = await CLI.runWith([
'write',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {AirbyteLog, AirbyteLogLevel} from 'faros-airbyte-cdk';
import fs from 'fs';
import _ from 'lodash';
import {getLocal} from 'mockttp';
import pino from 'pino';
Expand All @@ -26,7 +25,6 @@ describe('phabricator', () => {

afterEach(async () => {
await mockttp.stop();
fs.unlinkSync(configPath);
});

test('process records from all streams', async () => {
Expand Down
Loading

0 comments on commit ca4ef31

Please sign in to comment.