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
Next Next commit
chore: updates Node to v16 (BKTCLT-3)
george-the-wizard committed Oct 18, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 95cbb9f11d5cdedff45c7ef4e706e05c0e3de7f3
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
25 changes: 14 additions & 11 deletions tests/unit/simple_tests.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
'use strict'; // eslint-disable-line strict

george-the-wizard marked this conversation as resolved.
Show resolved Hide resolved
// 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',
@@ -38,19 +39,21 @@ const httpsOptions = {
requestCert: true,
};

const REST_CLIENT_SERVERNAME = '127.0.0.1';

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]),
},
};

@@ -100,7 +103,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 => {
2,170 changes: 1,159 additions & 1,011 deletions yarn.lock

Large diffs are not rendered by default.