Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: chore: updates Node to v16 (BKTCLT-3) #226

Open
wants to merge 11 commits into
base: development/7.4
Choose a base branch
from
7 changes: 6 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
{ "extends": "scality" }
{
"extends": "scality",
"rules": {
"prettier/prettier": 0,
},
}
2 changes: 0 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ jobs:
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: install dependencies
run: yarn install --frozen-lockfile
- name: run lint
run: yarn run --silent lint -- --max-warnings 0
- name: set host bucketclient.testing.local
run: sudo bash -c 'echo "127.0.0.1 bucketclient.testing.local" >> /etc/hosts'
- name: run test
Expand Down
8 changes: 8 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should add prettier at the same time as a node upgrade, maybe a separate PR

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. @george-the-wizard please focus on upgrading the code to be compatible with Node 16 and any additional work can be followed up later.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@miniscruff @rahulreddy I needed it in order to be able to troubleshoot the issues efficiently, I will revert the related changes after it builds flawlessly - thx

jsxBracketSameLine: true,
singleQuote: true,
trailingComma: 'all',
printWidth: 80,
tabWidth: 4,
useTabs: false,
};
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@
},
"homepage": "https://github.com/scality/bucketclient#readme",
"devDependencies": {
"eslint": "^2.4.0",
"eslint-config-airbnb": "^6.0.0",
"eslint": "^7.32.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-config-scality": "scality/Guidelines#71a059ad",
"eslint-plugin-react": "4.2.3",
"mocha": ""
"eslint-plugin-import": "^2.22.1",
"mocha": "^8.4.0"
},
"dependencies": {
"agentkeepalive": "^4.1.3",
Expand Down
24 changes: 12 additions & 12 deletions tests/unit/simple_tests.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
'use strict'; // eslint-disable-line strict

const assert = require('assert');
const fs = require('fs');
const http = require('http');
const https = require('https');

const errors = require('arsenal').errors;
const { errors } = require('arsenal');

const RESTClient = require('../../index.js').RESTClient;
const { RESTClient } = require('../../index.js');

const existBucket = {
name: 'Zaphod',
Expand Down Expand Up @@ -38,19 +36,21 @@ const httpsOptions = {
requestCert: true,
};

const REST_CLIENT_SERVERNAME = 'bucketclient.testing.local';

const env = {
http: {
c: new RESTClient(['bucketclient.testing.local:9000']),
c: new RESTClient([`${REST_CLIENT_SERVERNAME}:9000`]),
s: handler => http.createServer(handler),
},
https: {
s: handler => https.createServer(httpsOptions, handler),
c: new RESTClient(['bucketclient.testing.local:9000'],
undefined,
true,
httpsOptions.key,
httpsOptions.cert,
httpsOptions.ca[0]),
c: new RESTClient([`${REST_CLIENT_SERVERNAME}:9000`],
undefined,
true,
httpsOptions.key,
httpsOptions.cert,
httpsOptions.ca[0]),
},
};

Expand Down Expand Up @@ -100,7 +100,7 @@ Object.keys(env).forEach(key => {

it('should create a new non-existing bucket', done => {
client.createBucket(nonExistBucket.name, reqUids,
'{ status: "dead" }', done);
'{ status: "dead" }', done);
});

it('should try to create an already existing bucket and fail', done => {
Expand Down
Loading