Skip to content

Commit

Permalink
Merge pull request #1505 from FredrikNoren/#1495-alt
Browse files Browse the repository at this point in the history
[#1495] Stabilize CI tests
  • Loading branch information
jung-kim authored Feb 26, 2022
2 parents 58195ea + 32e6f86 commit e8a5a78
Show file tree
Hide file tree
Showing 67 changed files with 4,904 additions and 3,685 deletions.
22 changes: 18 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"root": true,
"extends": ["eslint:recommended", "plugin:prettier/recommended"],
"extends": [
"eslint:recommended",
"plugin:prettier/recommended"
],
"parserOptions": {
"ecmaVersion": 2020
},
Expand All @@ -10,8 +13,19 @@
},
"rules": {
"array-callback-return": "error",
"no-unused-vars": ["error", { "args": "none" }],
"no-unused-vars": [
"error",
{
"args": "none"
}
],
"prefer-const": "warn",
"quotes": ["warn", "single", { "avoidEscape": true }]
"quotes": [
"warn",
"single",
{
"avoidEscape": true
}
]
}
}
}
6 changes: 3 additions & 3 deletions .mochaclicktest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"spec": "clicktests/spec.*.js",
"file": "./source/utils/winston.js",
"timeout": 35000,
"file": "./source/utils/logger.js",
"timeout": 20000,
"bail": true,
"exit": true
}
}
6 changes: 3 additions & 3 deletions .mochatest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"spec": "test/spec.*.js",
"file": "./source/utils/winston.js",
"timeout": 5000,
"file": "./source/utils/logger.js",
"timeout": 12000,
"exit": true
}
}
9 changes: 2 additions & 7 deletions bin/credentials-helper
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
#!/usr/bin/env node
const winston = require('../source/utils/winston');
const http = require('http');
const socketId = process.argv[2];
const portAndRootPath = process.argv[3];
const remote = process.argv[4];
const action = process.argv[5];

winston.info(`Credentials helper invoked; portAndRootPath:${portAndRootPath} socketId:${socketId}`);

if (action == 'get') {
winston.info('Getting credentials');
http
.get(
`http://localhost:${portAndRootPath}/api/credentials?socketId=${socketId}&remote=${encodeURIComponent(
remote
)}`,
(res) => {
winston.info('Got credentials');
let rawData = '';
res.on('data', (chunk) => {
rawData += chunk;
Expand All @@ -29,8 +24,8 @@ if (action == 'get') {
}
)
.on('error', (err) => {
winston.error("Error getting credentials, couldn't query server", err);
console.error("Error getting credentials, couldn't query server", err);
});
} else {
winston.info(`Unhandled action: ${action}`);
console.info(`Unhandled action: ${action}`);
}
1 change: 0 additions & 1 deletion bin/ungit
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
const startLaunchTime = Date.now();

// eslint-disable-next-line no-unused-vars -- Imported for side effects
const winston = require('../source/utils/winston');
const config = require('../source/config');
const open = require('open');
const path = require('path');
Expand Down
Loading

0 comments on commit e8a5a78

Please sign in to comment.