From 53eb0733e105c46e3e38266856a0c6380c439070 Mon Sep 17 00:00:00 2001 From: Chyroc Chen Date: Tue, 10 Jan 2017 19:33:54 +0800 Subject: [PATCH 1/3] add all tdd test --- package.json | 2 +- src/authorization/create.js | 7 -- src/authorization/delete.js | 6 - src/authorization/get.js | 7 -- src/connecttor/get.js | 26 ----- src/connecttor/setOptions.js | 13 --- src/constants.js | 40 ------- src/driver/get.js | 17 --- src/driver/setOptions.js | 13 --- src/index.js | 10 +- src/job/create.js | 29 ----- src/job/delete.js | 27 ----- src/job/get.js | 40 ------- src/job/setOptions.js | 124 -------------------- src/job/setTemplate.js | 189 ------------------------------ src/job/update.js | 37 ------ src/link/create.js | 34 ------ src/link/delete.js | 27 ----- src/link/get.js | 37 ------ src/link/setOptions.js | 205 --------------------------------- src/link/update.js | 30 ----- src/submission/get.js | 21 ---- src/submission/setOptions.js | 26 ----- src/submission/status.js | 45 -------- src/utils/getVersion.js | 29 ----- src/utils/setRequestOptions.js | 103 ----------------- test/authorization.test.js | 22 ++++ test/connector.test.js | 15 +++ test/driver.test.js | 15 +++ test/index.js | 10 -- test/job.test.js | 34 ++++++ test/link.test.js | 26 +++++ test/mocha.opts | 1 + test/submission.test.js | 15 +++ test/utils.test.js | 15 +++ yarn.lock | 38 ++++-- 36 files changed, 181 insertions(+), 1154 deletions(-) delete mode 100644 src/authorization/create.js delete mode 100644 src/authorization/delete.js delete mode 100644 src/authorization/get.js delete mode 100644 src/connecttor/get.js delete mode 100644 src/connecttor/setOptions.js delete mode 100644 src/constants.js delete mode 100644 src/driver/get.js delete mode 100644 src/driver/setOptions.js delete mode 100644 src/job/create.js delete mode 100644 src/job/delete.js delete mode 100644 src/job/get.js delete mode 100644 src/job/setOptions.js delete mode 100644 src/job/setTemplate.js delete mode 100644 src/job/update.js delete mode 100644 src/link/create.js delete mode 100644 src/link/delete.js delete mode 100644 src/link/get.js delete mode 100644 src/link/setOptions.js delete mode 100644 src/link/update.js delete mode 100644 src/submission/get.js delete mode 100644 src/submission/setOptions.js delete mode 100644 src/submission/status.js delete mode 100644 src/utils/getVersion.js delete mode 100644 src/utils/setRequestOptions.js create mode 100644 test/authorization.test.js create mode 100644 test/connector.test.js create mode 100644 test/driver.test.js delete mode 100644 test/index.js create mode 100644 test/job.test.js create mode 100644 test/link.test.js create mode 100644 test/submission.test.js create mode 100644 test/utils.test.js diff --git a/package.json b/package.json index e61da15..f102a66 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,6 @@ }, "dependencies": { "isomorphic-fetch": "^2.2.1", - "request-promise": "^4.1.1" }, "devDependencies": { "babel-cli": "^6.18.0", @@ -23,6 +22,7 @@ "coveralls": "^2.11.15", "mocha": "^3.2.0", "nyc": "^10.0.0", + "preset": "^1.0.0", "rimraf": "^2.5.4", "snazzy": "^5.0.0", "standard": "^8.6.0" diff --git a/src/authorization/create.js b/src/authorization/create.js deleted file mode 100644 index 6e2e38d..0000000 --- a/src/authorization/create.js +++ /dev/null @@ -1,7 +0,0 @@ -/** - * Created by Chyroc on 17/1/5. - */ - -export function createRole () { - -} diff --git a/src/authorization/delete.js b/src/authorization/delete.js deleted file mode 100644 index bf21624..0000000 --- a/src/authorization/delete.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Created by Chyroc on 17/1/5. - */ -export function deleteRole () { - -} diff --git a/src/authorization/get.js b/src/authorization/get.js deleted file mode 100644 index 7d2bee5..0000000 --- a/src/authorization/get.js +++ /dev/null @@ -1,7 +0,0 @@ -/** - * Created by Chyroc on 17/1/5. - */ - -export function getRole () { - -} diff --git a/src/connecttor/get.js b/src/connecttor/get.js deleted file mode 100644 index 2dca6e6..0000000 --- a/src/connecttor/get.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Created by Chyroc on 17/1/3. - */ - -const r = require('request-promise') - -import {setGetConnectorOptions} from './setOptions' - -export function getConnectorAll () { - const options = setGetConnectorOptions('all') - return r(options) - .then(function (repos) { - return repos - }) - .catch(function (err) { - }) -} -export function getConnectorByConnectorName (connectorName) { - const options = setGetConnectorOptions('subName', connectorName) - return r(options) - .then(function (repos) { - return repos - }) - .catch(function (err) { - }) -} diff --git a/src/connecttor/setOptions.js b/src/connecttor/setOptions.js deleted file mode 100644 index 8a636ad..0000000 --- a/src/connecttor/setOptions.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Created by Chyroc on 17/1/5. - */ - -import {setGetOptions} from '../utils/setRequestOptions' - -export function setGetConnectorOptions (tag = 'all', connectorName = null) { - if (tag === 'all') { - return setGetOptions(tag, 'v1/connector') - } else if (tag === 'subName') { - return setGetOptions(tag, 'v1/connector', connectorName) - } -} diff --git a/src/constants.js b/src/constants.js deleted file mode 100644 index 2e88f8a..0000000 --- a/src/constants.js +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Created by Chyroc on 17/1/3. - */ - -export const host = 'http://54.223.18.58' -export const port = 12000 -export const webapp = 'sqoop' -export const baseUrl = host + ':' + port + '/' + webapp + '/' - -export const userName = 'Admin' - -/** - * - * com.mysql.jdbc.Driver - * - * jdbc:mysql://115.28.245.5:3306/same - * - * - * liaa_user - * - * - * hdfs-connector - * - * - * s3a://sqoop2/ - * - * - * fs.s3a.access.key=AKIAOISG3IRVOIUP2PNA - * - * fs.s3a.secret.key=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 - * - * fs.s3a.impl=org.apache.hadoop.fs.s3a.S3AFileSystem - * - * fs.s3a.endpoint=s3.cn-north-1.amazonaws.com.cn - * - * - * set option --name verbose --value true - * - * - **/ diff --git a/src/driver/get.js b/src/driver/get.js deleted file mode 100644 index 699001d..0000000 --- a/src/driver/get.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Created by Chyroc on 17/1/5. - */ - -import {setGetJobOptions} from './setOptions' - -const r = require('request-promise') - -export function getDriverAll () { - const options = setGetJobOptions('all') - return r(options) - .then(function (repos) { - return repos['links'] - }) - .catch(function (err) { - }) -} diff --git a/src/driver/setOptions.js b/src/driver/setOptions.js deleted file mode 100644 index d8281c3..0000000 --- a/src/driver/setOptions.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Created by Chyroc on 17/1/9. - */ - -import {setGetOptions} from '../utils/setRequestOptions' - -const driverUri = 'v1/driver' - -export function setGetJobOptions (tag = 'all') { - if (tag === 'all') { - return setGetOptions(tag, driverUri) - } -} diff --git a/src/index.js b/src/index.js index 3a3ed5d..11657d7 100644 --- a/src/index.js +++ b/src/index.js @@ -1 +1,9 @@ -console.log('this shall pass') +/** + * Created by Chyroc on 17/1/10. + */ + +export class Hasoop { + constructor (config) { + this.config = config + } +} \ No newline at end of file diff --git a/src/job/create.js b/src/job/create.js deleted file mode 100644 index 3919d49..0000000 --- a/src/job/create.js +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Created by Chyroc on 17/1/4. - */ - -import {setCreateOrUpdateJobOptions} from './setOptions' - -const r = require('request-promise') - -// const fromLinkConf = { -// 'type': 'mysql', -// 'schemaName': 'test', -// 'tableName': 'test', -// 'linkName': 'edf', -// } -// const toLinkConf = { -// 'type': 'hdfs', -// 'putputDir': '/sqoop2/ali', -// 'linkName': 'edf', -// } - -export function createJob (jobName, fromLinkConf, toLinkConf) { - // TODO - const options = setCreateOrUpdateJobOptions(jobName, fromLinkConf, toLinkConf) - console.log(options['body']['jobs']) - return r(options) - .then(function (repos) { - return repos - }) -} diff --git a/src/job/delete.js b/src/job/delete.js deleted file mode 100644 index 66c373a..0000000 --- a/src/job/delete.js +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Created by Chyroc on 17/1/4. - */ - -import {setDeleteJobOptions} from './setOptions' -import {getJobAll} from './get' - -const r = require('request-promise') - -export function deleteJob (jobName) { - const options = setDeleteJobOptions(jobName) - return r(options) - .then(function (repos) { - return repos - }) - .catch(function (err) { - }) -} - -export async function deleteJobAll () { - const jobs = await getJobAll() - for (let i = 0; i < jobs.length; ++i) { - const jobName = jobs[i]['name'] - deleteJob(jobName) - console.log(jobName) - } -} diff --git a/src/job/get.js b/src/job/get.js deleted file mode 100644 index 8d4bcae..0000000 --- a/src/job/get.js +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Created by Chyroc on 17/1/4. - */ - -import {setGetJobOptions} from './setOptions' - -const r = require('request-promise') - -export function getJobAll () { - const options = setGetJobOptions('all') - return r(options) - .then(function (repos) { - return repos['jobs'] - }) - .catch(function (err) { - - }) -} - -export function getJobByJobName (jobName) { - const options = setGetJobOptions('subName', jobName) - return r(options) - .then(function (repos) { - return repos['jobs'] - }) - .catch(function (err) { - - }) -} - -export function getJobByConnectorName () { - const options = setGetJobOptions('cname', connectorName) - return r(options) - .then(function (repos) { - return repos['jobs'] - }) - .catch(function (err) { - - }) -} diff --git a/src/job/setOptions.js b/src/job/setOptions.js deleted file mode 100644 index 92bdcdc..0000000 --- a/src/job/setOptions.js +++ /dev/null @@ -1,124 +0,0 @@ -/** - * Created by Chyroc on 17/1/4. - */ - -import {setGetOptions, setPostOptions, setPutOptions, setDeleteOptions} from '../utils/setRequestOptions' -import {setMysqlConfig, setHdfsConfig} from './setTemplate' - -const jobUri = 'v1/job' - -export function setGetJobOptions (tag, jobOrConnectorName = null) { - if (tag === 'all') { - return setGetOptions(tag, jobUri) - } else if (tag === 'jobName') { - return setGetOptions(tag, jobUri, jobOrConnectorName) - } else if (tag === 'cname') { - return setGetOptions('cname', jobUri, jobOrConnectorName) - } -} - -export function setCreateOrUpdateJobOptions (jobName, fromLinkConf, toLinkConf) { - // TODO - // from - let fromConfigValues - if (fromLinkConf['type'] === 'mysql') { - fromConfigValues = setMysqlConfig(fromLinkConf) - fromLinkConf['connectorName'] = 'generic-jdbc-connector' - } else if (fromLinkConf['type'] === 'hdfs') { - fromConfigValues = setHdfsConfig(fromLinkConf) - fromLinkConf['connectorName'] = 'hdfs-connector' - } else { - throw Error() - } - - // to - let toConfigValues - if (toLinkConf['type'] === 'mysql') { - toConfigValues = setMysqlConfig(toLinkConf) - toLinkConf['connectorName'] = 'generic-jdbc-connector' - } else if (toLinkConf['type'] === 'hdfs') { - toConfigValues = setHdfsConfig(toLinkConf) - toLinkConf['connectorName'] = 'hdfs-connector' - } else { - throw Error() - } - - const body = - { - 'jobs': [ - { - 'creation-user': null, - 'name': jobName, - 'creation-date': Date.now(), - 'id': -1, - 'update-date': Date.now(), - 'update-user': null, - 'to-config-values': toConfigValues, - 'from-config-values': fromConfigValues, - 'to-connector-name': toLinkConf['connectorName'], - 'from-link-name': fromLinkConf['linkName'], - 'enabled': true, - 'from-connector-name': fromLinkConf['connectorName'], - 'to-link-name': toLinkConf['linkName'], - 'driver-config-values': { - 'configs': [ - { - 'validators': [], - 'inputs': [ - { - 'editable': 'ANY', - 'validators': [], - 'name': 'throttlingConfig.numExtractors', - 'id': 88, - 'sensitive': false, - 'overrides': '', - 'type': 'INTEGER', - 'value': '1' - }, { - 'editable': 'ANY', - 'validators': [], - 'name': 'throttlingConfig.numLoaders', - 'id': 89, - 'sensitive': false, - 'overrides': '', - 'type': 'INTEGER', - 'value': '1' - } - ], - 'name': 'throttlingConfig', - 'id': 22, - 'type': 'JOB' - }, { - 'validators': [], - 'inputs': [{ - 'editable': 'ANY', - 'validators': [], - 'name': 'jarConfig.extraJars', - 'id': 90, - 'sensitive': false, - 'overrides': '', - 'type': 'LIST' - } - ], - 'name': 'jarConfig', - 'id': 23, - 'type': 'JOB' - } - ], - 'validators': [] - } - } - ] - } - return setPostOptions('v1/job', body) -} - -export function setDeleteJobOptions (jobName) { - return setDeleteOptions(jobName, jobUri) -} - -export function setUpdateJobOptions (tag, jobName) { - if (tag === 'enable' || tag === 'disable') { - return setPutOptions('enable', jobUri, jobName) - } -} diff --git a/src/job/setTemplate.js b/src/job/setTemplate.js deleted file mode 100644 index d173dc6..0000000 --- a/src/job/setTemplate.js +++ /dev/null @@ -1,189 +0,0 @@ -/** - * Created by Chyroc on 17/1/5. - */ -export function setMysqlConfig (linkConf) { - return { - 'configs': [ - { - 'validators': [], - 'inputs': [ - { - 'size': 50, - 'editable': 'ANY', - 'validators': [], - 'name': 'fromJobConfig.schemaName', - 'id': 74, - 'sensitive': false, - 'overrides': '', - 'type': 'STRING', - 'value': linkConf['schemaName'] - }, { - 'size': 50, - 'editable': 'ANY', - 'validators': [], - 'name': 'fromJobConfig.tableName', - 'id': 75, - 'sensitive': false, - 'overrides': '', - 'type': 'STRING', - 'value': linkConf['tableName'] - }, { - 'size': 2000, - 'editable': 'ANY', - 'validators': [], - 'name': 'fromJobConfig.sql', - 'id': 76, - 'sensitive': false, - 'overrides': '', - 'type': 'STRING' - }, { - 'editable': 'ANY', - 'validators': [], - 'name': 'fromJobConfig.columnList', - 'id': 77, - 'sensitive': false, - 'overrides': '', - 'type': 'LIST' - }, { - 'size': 50, - 'editable': 'ANY', - 'validators': [], - 'name': 'fromJobConfig.partitionColumn', - 'id': 78, - 'sensitive': false, - 'overrides': '', - 'type': 'STRING', - 'value': linkConf['partitionColumn'] - }, { - 'editable': 'ANY', - 'validators': [], - 'name': 'fromJobConfig.allowNullValueInPartitionColumn', - 'id': 79, - 'sensitive': false, - 'overrides': '', - 'type': 'BOOLEAN' - }, { - 'size': 50, - 'editable': 'ANY', - 'validators': [], - 'name': 'fromJobConfig.boundaryQuery', - 'id': 80, - 'sensitive': false, - 'overrides': '', - 'type': 'STRING' - } - ], - 'name': 'fromJobConfig', - 'id': 19, - 'type': 'JOB' - }, { - 'validators': [], - 'inputs': [ - { - 'size': 50, - 'editable': 'ANY', - 'validators': [], - 'name': 'incrementalRead.checkColumn', - 'id': 81, - 'sensitive': false, - 'overrides': '', - 'type': 'STRING' - }, { - 'size': -1, - 'editable': 'ANY', - 'validators': [], - 'name': 'incrementalRead.lastValue', - 'id': 82, - 'sensitive': false, - 'overrides': '', - 'type': 'STRING' - } - ], - 'name': 'incrementalRead', - 'id': 20, - 'type': 'JOB' - } - ], - 'validators': [] - } -} - -export function setHdfsConfig (linkConf) { - return { - 'configs': [ - { - 'validators': [], - 'inputs': [ - { - 'editable': 'ANY', - 'validators': [], - 'name': 'toJobConfig.overrideNullValue', - 'id': 60, - 'sensitive': false, - 'overrides': '', - 'type': 'BOOLEAN' - }, { - 'size': 255, - 'editable': 'ANY', - 'validators': [], - 'name': 'toJobConfig.nullValue', - 'id': 61, - 'sensitive': false, - 'overrides': '', - 'type': 'STRING' - }, { - 'editable': 'ANY', - 'validators': [], - 'values': 'TEXT_FILE,SEQUENCE_FILE,PARQUET_FILE', - 'name': 'toJobConfig.outputFormat', - 'id': 62, - 'sensitive': false, - 'overrides': '', - 'type': 'ENUM', - 'value': 'TEXT_FILE' - }, { - 'editable': 'ANY', - 'validators': [], - 'values': 'NONE,DEFAULT,DEFLATE,GZIP,BZIP2,LZO,LZ4,SNAPPY,CUSTOM', - 'name': 'toJobConfig.compression', - 'id': 63, - 'sensitive': false, - 'overrides': '', - 'type': 'ENUM', - 'value': 'NONE' - }, { - 'size': 255, - 'editable': 'ANY', - 'validators': [], - 'name': 'toJobConfig.customCompression', - 'id': 64, - 'sensitive': false, - 'overrides': '', - 'type': 'STRING' - }, { - 'size': 255, - 'editable': 'ANY', - 'validators': [], - 'name': 'toJobConfig.outputDirectory', - 'id': 65, - 'sensitive': false, - 'overrides': '', - 'type': 'STRING', - 'value': encodeURIComponent(linkConf['outputDir']) - }, { - 'editable': 'ANY', - 'validators': [], - 'name': 'toJobConfig.appendMode', - 'id': 66, - 'sensitive': false, - 'overrides': '', - 'type': 'BOOLEAN' - } - ], - 'name': 'toJobConfig', - 'id': 16, - 'type': 'JOB' - } - ], 'validators': [] - } -} diff --git a/src/job/update.js b/src/job/update.js deleted file mode 100644 index a8e88be..0000000 --- a/src/job/update.js +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Created by Chyroc on 17/1/4. - */ - -import {setUpdateJobOptions, setCreateOrUpdateJobOptions} from './setOptions' - -const r = require('request-promise') - -export function updateJob (jobName, fromLinkConf, toLinkConf) { - // TODO - const options = setCreateOrUpdateJobOptions(jobName, fromLinkConf, toLinkConf) - console.log(options['body']['jobs']) - return r(options) - .then(function (repos) { - return repos - }) -} - -export function updateJobEnable (jobName) { - const options = setUpdateJobOptions('enable', jobName) - return r(options) - .then(function (repos) { - return repos - }) - .catch(function (err) { - }) -} - -export function updateJobDisable (jobName) { - const options = setUpdateJobOptions('disable', jobName) - return r(options) - .then(function (repos) { - return repos - }) - .catch(function (err) { - }) -} diff --git a/src/link/create.js b/src/link/create.js deleted file mode 100644 index 10806bd..0000000 --- a/src/link/create.js +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Created by Chyroc on 17/1/3. - */ - -import {setCreateLinkOptions} from './setOptions' - -const r = require('request-promise') - -// const mysqlParam = { -// 'uniqueLinkName': 'qwertyuio', -// 'DatabaseType': 'mysql', -// 'connectionHost': '', -// 'connectionPort': '', -// 'connectionDatabaseName': '', -// 'username': '', -// 'password': '', -// 'identifierEnclose': '`' -// } -// -// const s3Param = { -// 'DatabaseType': 's3' -// } - -export function createLink (linkName, param) { - // TODO 各种参数 - const options = setCreateLinkOptions(linkName, param) - return r(options) - .then(function (repos) { - return repos - }) - .catch(function (err) { - - }) -} diff --git a/src/link/delete.js b/src/link/delete.js deleted file mode 100644 index 475b48c..0000000 --- a/src/link/delete.js +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Created by Chyroc on 17/1/3. - */ - -import {setDeleteLinkOptions} from './setOptions' -import {getLinkAll} from './get' - -const r = require('request-promise') - -export function deleteLink (linkName) { - const options = setDeleteLinkOptions(linkName) - return r(options) - .then(function (repos) { - return repos - }) - .catch(function (err) { - }) -} - -export async function deleteLinkAll () { - const links = await getLinkAll() - for (let i = 0; i < links.length; ++i) { - const linkName = links[i]['name'] - deleteLink(linkName) - console.log(linkName) - } -} diff --git a/src/link/get.js b/src/link/get.js deleted file mode 100644 index 9fc4bda..0000000 --- a/src/link/get.js +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Created by Chyroc on 17/1/3. - */ - -import {setGetLinkOptions} from './setOptions' - -const r = require('request-promise') - -export function getLinkAll () { - const options = setGetLinkOptions('all') - return r(options) - .then(function (repos) { - return repos['links'] - }) - .catch(function (err) { - }) -} - -export function getLinkByLinkName (linkName) { - const options = setGetLinkOptions('subName', linkName) - return r(options) - .then(function (repos) { - return repos - }) - .catch(function (err) { - }) -} - -export function getLinkByConnectorName (connectorName) { - const options = setGetLinkOptions('cname', connectorName) - return r(options) - .then(function (repos) { - return repos - }) - .catch(function (err) { - }) -} diff --git a/src/link/setOptions.js b/src/link/setOptions.js deleted file mode 100644 index db8a4f3..0000000 --- a/src/link/setOptions.js +++ /dev/null @@ -1,205 +0,0 @@ -/** - * Created by Chyroc on 17/1/3. - */ - -import {setGetOptions, setPostOptions, setPutOptions, setDeleteOptions} from '../utils/setRequestOptions' - -const linkUri = 'v1/link' - -export function setCreateLinkOptions (linkName, param) { - const body = {} - if (param['DatabaseType'] === 'mysql') { - const uri = encodeURIComponent('jdbc:mysql://' + param['connectionHost'] + ':' + param['connectionPort']) - body['links'] = [ - { - 'id': -1, - 'name': linkName, - 'connector-name': 'generic-jdbc-connector', - 'enabled': true, - 'creation-date': Date.now(), - 'creation-user': null, - 'update-user': null, - 'update-date': Date.now(), - - 'link-config-values': { - 'configs': [ - { - 'validators': [], - 'inputs': [{ - 'size': 128, - 'editable': 'ANY', - 'validators': [], - 'name': 'linkConfig.jdbcDriver', - 'id': 67, - 'sensitive': false, - 'overrides': '', - 'type': 'STRING', - 'value': 'com.mysql.jdbc.Driver' - }, { - 'size': 2000, - 'editable': 'ANY', - 'validators': [], - 'name': 'linkConfig.connectionString', - 'id': 68, - 'sensitive': false, - 'overrides': '', - 'type': 'STRING', - 'value': uri - }, { - 'size': 40, - 'editable': 'ANY', - 'validators': [], - 'name': 'linkConfig.username', - 'id': 69, - 'sensitive': false, - 'overrides': '', - 'type': 'STRING', - 'value': param['username'] - }, { - 'size': 40, - 'editable': 'ANY', - 'validators': [], - 'name': 'linkConfig.password', - 'id': 70, - 'sensitive': true, - 'overrides': '', - 'type': 'STRING', - 'value': param['password'] - }, { - 'editable': 'ANY', - 'validators': [], - 'name': 'linkConfig.fetchSize', - 'id': 71, - 'sensitive': false, - 'overrides': '', - 'type': 'INTEGER' - }, { - 'editable': 'ANY', - 'validators': [], - 'name': 'linkConfig.jdbcProperties', - 'id': 72, - 'sensitive': false, - 'overrides': '', - 'type': 'MAP', - 'sensitive-pattern': '' - } - ], - 'name': 'linkConfig', - 'id': 17, - 'type': 'LINK' - }, { - 'validators': [], - 'inputs': [ - { - 'size': 5, - 'editable': 'ANY', - 'validators': [], - 'name': 'dialect.identifierEnclose', - 'id': 73, - 'sensitive': false, - 'overrides': '', - 'type': 'STRING', - 'value': encodeURIComponent(param['identifierEnclose']) - } - ], - 'name': 'dialect', - 'id': 18, - 'type': 'LINK' - } - ], - 'validators': [] - } - - } - ] - } else if (param['type'] === 'hdfs') { - // TODO - // param['uri'] = 's3a://sqoop2/' - // param['s3'] = {} - // param['s3']['access'] = 'AKIAOISG3IRVOIUP2PNA' - // param['s3']['secret'] = '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' - // param['s3']['region'] = 's3.cn-north-1.amazonaws.com.cn' - body['links'] = [ - { - 'id': -1, - 'name': linkName, - 'creation-user': null, - 'creation-date': Date.now(), - 'connector-name': 'hdfs-connector', - 'update-date': Date.now(), - 'enabled': true, - 'update-user': null, - 'link-config-values': { - 'configs': [ - { - 'validators': [], - 'inputs': [{ - 'size': 255, - 'editable': 'ANY', - 'validators': [], - 'name': 'linkConfig.uri', - 'id': 52, - 'sensitive': false, - 'overrides': '', - 'type': 'STRING', - 'value': encodeURIComponent('s3a://sqoop2/') - }, { - 'size': 255, - 'editable': 'ANY', - 'validators': [], - 'name': 'linkConfig.confDir', - 'id': 53, - 'sensitive': false, - 'overrides': '', - 'type': 'STRING' - }, { - 'editable': 'ANY', - 'validators': [], - 'name': 'linkConfig.configOverrides', - 'id': 54, - 'sensitive': false, - 'overrides': '', - 'type': 'MAP', - 'value': { - 'fs.s3a.access.key': 'AKIAOISG3IRVOIUP2PNA', - 'fs.s3a.impl': 'org.apache.hadoop.fs.s3a.S3AFileSystem', - 'fs.s3a.secret.key': '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', - 'fs.s3a.endpoint': 's3.cn-north-1.amazonaws.com.cn' - }, - 'sensitive-pattern': '' - } - ], - 'name': 'linkConfig', - 'id': 13, - 'type': 'LINK' - } - ], - 'validators': [] - } - } - ] - } else { - throw Error('only can deal mysql or hdfs') - } - return setPostOptions(linkUri, body) -} - -export function setDeleteLinkOptions (linkName) { - return setDeleteOptions(linkName, linkUri) -} - -export function setGetLinkOptions (tag = 'all', linkOrConnectorName = null) { - if (tag === 'all') { - return setGetOptions(tag, linkUri) - } else if (tag === 'subName') { - return setGetOptions(tag, linkUri, linkOrConnectorName) - } else if (tag === 'cname') { - return setGetOptions('cname', linkUri, linkOrConnectorName) - } -} - -export function setUpdateOptions (tag, linkName) { - if (tag === 'enable' || tag === 'disable') { - return setPutOptions('enable', linkUri, linkName) - } -} diff --git a/src/link/update.js b/src/link/update.js deleted file mode 100644 index 93c7adf..0000000 --- a/src/link/update.js +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Created by Chyroc on 17/1/3. - */ - -import {setUpdateOptions} from './setOptions' - -const r = require('request-promise') - -export function updateEnable (linkName) { - const options = setUpdateOptions('enable', linkName) - return r(options) - .then(function (repos) { - return repos - }) - .catch(function (err) { - }) -} - -export function updateDisable (linkName) { - const options = setUpdateOptions('disable', linkName) - return r(options) - .then(function (repos) { - return repos - }) - .catch(function (err) { - }) -} -export function updateLink (linkName) { - // TODO -} diff --git a/src/submission/get.js b/src/submission/get.js deleted file mode 100644 index e6d6b13..0000000 --- a/src/submission/get.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Created by Chyroc on 17/1/5. - */ - -import {setGetSubmissionOptions} from './setOptions' - -const r = require('request-promise') - -export function getSubmissionALL () { - const options = setGetSubmissionOptions('all') - return r(options) - .then(function (repos) { - return repos['links'] - }) - .catch(function (err) { - }) -} - -export function getSubmissionByJobName () { - -} diff --git a/src/submission/setOptions.js b/src/submission/setOptions.js deleted file mode 100644 index e2594cb..0000000 --- a/src/submission/setOptions.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Created by Chyroc on 17/1/6. - */ - -import {setGetOptions, setPutOptions} from '../utils/setRequestOptions' - -const jobUri = 'v1/job' -const submissionUri = 'v1/submissions' - -export function setStartJobOptions (jobName) { - return setPutOptions('start', jobUri, jobName) -} - -export function setStopJobOptions (jobName) { - return setPutOptions('stop', jobUri, jobName) -} - -export function setGetJobStatusOptions (jobName) { - return setGetOptions('status', jobUri, jobName) -} - -export function setGetSubmissionOptions (tag = 'all') { - if (tag === 'all') { - return setGetOptions(tag, submissionUri) - } -} diff --git a/src/submission/status.js b/src/submission/status.js deleted file mode 100644 index 9b7ce83..0000000 --- a/src/submission/status.js +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Created by Chyroc on 17/1/5. - */ - -import {setStartJobOptions, setStopJobOptions, setGetJobStatusOptions} from './setOptions' - -const r = require('request-promise') - -export function startJob (jobName) { - const options = setStartJobOptions(jobName) - return r(options) - .then(function (repos) { - console.log(repos) - return repos - }) - .catch(function (err) { - - }) -} - -export function stopJob (jobName) { - const options = setStopJobOptions(jobName) - return r(options) - .then(function (repos) { - console.log(repos) - return repos - }) - .catch(function (err) { - - }) -} - -export function getJobStatus (jobName) { - const options = setGetJobStatusOptions(jobName) - return r(options) - .then(function (repos) { - console.log(repos) - return repos - }) - .catch(function (err) { - - }) -} - -getJobStatus('movie_s3') diff --git a/src/utils/getVersion.js b/src/utils/getVersion.js deleted file mode 100644 index e685fd6..0000000 --- a/src/utils/getVersion.js +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Created by Chyroc on 17/1/5. - */ - -import {userName, baseUrl} from '../constants' - -const r = require('request-promise') - -function setGetVersionOptions () { - return { - method: 'GET', - uri: baseUrl + 'version', - qs: { - 'user.name': userName - }, - json: true - } -} - -export function getVersion () { - const options = setGetVersionOptions() - return r(options) - .then(function (repos) { - return repos - }) - .catch(function (err) { - - }) -} diff --git a/src/utils/setRequestOptions.js b/src/utils/setRequestOptions.js deleted file mode 100644 index cbf23c4..0000000 --- a/src/utils/setRequestOptions.js +++ /dev/null @@ -1,103 +0,0 @@ -/** - * Created by Chyroc on 17/1/4. - */ - -import {userName, baseUrl} from '../constants' - -export function setGetOptions (tag, uri, linkOrJobOrConnectorName = null) { - if (tag === 'all') { - return { - method: 'GET', - uri: baseUrl + uri + '/' + tag, - qs: { - 'user.name': userName - }, - json: true - } - } else if (tag === 'subName') { - return { - method: 'GET', - uri: baseUrl + uri + '/' + linkOrJobOrConnectorName, - qs: { - 'user.name': userName - }, - json: true - } - } else if (tag === 'lname') { - return { - method: 'GET', - uri: baseUrl + uri + '/' + linkOrJobOrConnectorName, - qs: { - 'user.name': userName - }, - json: true - } - } else if (tag === 'cname') { - return { - method: 'GET', - uri: baseUrl + uri + '/' + linkOrJobOrConnectorName, - qs: { - 'user.name': userName, - 'cname': linkOrJobOrConnectorName - }, - json: true - } - } else if (tag === 'status') { - return { - method: 'GET', - uri: baseUrl + uri + '/' + linkOrJobOrConnectorName + '/status', - qs: { - 'user.name': userName - }, - json: true - } - } -} - -export function setPostOptions (uri, body) { - return { - method: 'POST', - uri: baseUrl + uri, - json: true, - qs: { - 'user.name': userName - }, - headers: { - 'content-type': 'application/json' - }, - body: body - } -} - -export function setPutOptions (tag, uri, linkOrJobName) { - if (tag === 'enable' || tag === 'disable') { - return { - method: 'PUT', - uri: baseUrl + uri + '/' + linkOrJobName + '/' + tag, - qs: { - 'user.name': userName - }, - json: true - } - } else if (tag === 'start' || tag === 'stop') { - return { - method: 'PUT', - uri: baseUrl + uri + '/' + linkOrJobName + '/' + tag, - qs: { - 'user.name': userName - }, - json: true - } - } -} - -export function setDeleteOptions (linkOrJobName, uri) { - return { - method: 'DELETE', - uri: baseUrl + uri + '/' + linkOrJobName, - qs: { - 'user.name': userName - }, - json: true - } -} diff --git a/test/authorization.test.js b/test/authorization.test.js new file mode 100644 index 0000000..f146868 --- /dev/null +++ b/test/authorization.test.js @@ -0,0 +1,22 @@ +/** + * Created by Chyroc on 17/1/10. + */ + +import { expect } from 'chai' +import { Hasoop } from '../src/index' + +const sqoopClient = new Hasoop('') + +suite('authorization', () => { + test('createRole', () => { + sqoopClient.createRole() + }) + + test('deleteRole', () => { + sqoopClient.deleteRole() + }) + + test('getRole', () => { + sqoopClient.getRole() + }) +}) \ No newline at end of file diff --git a/test/connector.test.js b/test/connector.test.js new file mode 100644 index 0000000..ccdde93 --- /dev/null +++ b/test/connector.test.js @@ -0,0 +1,15 @@ +/** + * Created by Chyroc on 17/1/10. + */ + +import { expect } from 'chai' +import { Hasoop } from '../src/index' + +const sqoopClient = new Hasoop('') + +suite('connector', () => { + test('getConnector', () => { + sqoopClient.getConnector() + }) + +}) \ No newline at end of file diff --git a/test/driver.test.js b/test/driver.test.js new file mode 100644 index 0000000..afe6dca --- /dev/null +++ b/test/driver.test.js @@ -0,0 +1,15 @@ +/** + * Created by Chyroc on 17/1/10. + */ + +import { expect } from 'chai' +import { Hasoop } from '../src/index' + +const sqoopClient = new Hasoop('') + +suite('driver', () => { + test('getDriver', () => { + sqoopClient.getDriver() + }) + +}) \ No newline at end of file diff --git a/test/index.js b/test/index.js deleted file mode 100644 index 1ef3d74..0000000 --- a/test/index.js +++ /dev/null @@ -1,10 +0,0 @@ -/* eslint-env mocha */ -import { expect } from 'chai' -import index from '../src' - -describe('whatever should work', () => { - it('works', () => { - expect(1).to.be.equal(1) - expect(index).to.be.empty - }) -}) diff --git a/test/job.test.js b/test/job.test.js new file mode 100644 index 0000000..3b7d03e --- /dev/null +++ b/test/job.test.js @@ -0,0 +1,34 @@ +/** + * Created by Chyroc on 17/1/10. + */ + +import { expect } from 'chai' +import { Hasoop } from '../src/index' + +const sqoopClient = new Hasoop('') + +suite('job', () => { + test('createJob', () => { + sqoopClient.createJob() + }) + + test('deleteJob', () => { + sqoopClient.deleteJob() + }) + + test('getJob', () => { + sqoopClient.getJob() + }) + + test('updateJob', () => { + sqoopClient.updateJob() + }) + + test('startJob', () => { + sqoopClient.startJob() + }) + + test('stopJob', () => { + sqoopClient.stopJob() + }) +}) \ No newline at end of file diff --git a/test/link.test.js b/test/link.test.js new file mode 100644 index 0000000..18980d8 --- /dev/null +++ b/test/link.test.js @@ -0,0 +1,26 @@ +/** + * Created by Chyroc on 17/1/10. + */ + +import { expect } from 'chai' +import { Hasoop } from '../src/index' + +const sqoopClient = new Hasoop('') + +suite('link', () => { + test('createLink', () => { + sqoopClient.createLink() + }) + + test('updateLink', () => { + sqoopClient.updateLink() + }) + + test('deleteLink', () => { + sqoopClient.deleteLink() + }) + + test('getLink', () => { + sqoopClient.getLink() + }) +}) \ No newline at end of file diff --git a/test/mocha.opts b/test/mocha.opts index ccd1f09..1514f1a 100644 --- a/test/mocha.opts +++ b/test/mocha.opts @@ -1 +1,2 @@ --compilers js:babel-core/register +--ui tdd \ No newline at end of file diff --git a/test/submission.test.js b/test/submission.test.js new file mode 100644 index 0000000..d15998f --- /dev/null +++ b/test/submission.test.js @@ -0,0 +1,15 @@ +/** + * Created by Chyroc on 17/1/10. + */ + +import { expect } from 'chai' +import { Hasoop } from '../src/index' + +const sqoopClient = new Hasoop('') + +suite('submission', () => { + test('getSubmission', () => { + sqoopClient.getSubmission() + }) + +}) \ No newline at end of file diff --git a/test/utils.test.js b/test/utils.test.js new file mode 100644 index 0000000..a5ee495 --- /dev/null +++ b/test/utils.test.js @@ -0,0 +1,15 @@ +/** + * Created by Chyroc on 17/1/10. + */ + +import { expect } from 'chai' +import { Hasoop } from '../src/index' + +const sqoopClient = new Hasoop('') + +suite('utils', () => { + test('getVersion', () => { + sqoopClient.getVersion() + }) + +}) \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 45b3db5..b737dcd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -989,6 +989,10 @@ doctrine@^1.2.2: esutils "^2.0.2" isarray "^1.0.0" +dom-walk@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.1.tgz#672226dc74c8f799ad35307df936aba11acd6018" + ecc-jsbn@~0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" @@ -1381,7 +1385,7 @@ glob-parent@^2.0.0: dependencies: is-glob "^2.0.0" -glob@7.0.5, glob@^7.0.0, glob@^7.0.3, glob@^7.0.5: +glob@7.0.5: version "7.0.5" resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.5.tgz#b4202a69099bbb4d292a7c1b95b6682b67ebdc95" dependencies: @@ -1402,7 +1406,7 @@ glob@^5.0.5: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.6: +glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6: version "7.1.1" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" dependencies: @@ -1413,6 +1417,13 @@ glob@^7.0.6: once "^1.3.0" path-is-absolute "^1.0.0" +global@^4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/global/-/global-4.3.1.tgz#5f757908c7cbabce54f386ae440e11e26b7916df" + dependencies: + min-document "^2.19.0" + process "~0.5.1" + globals@^9.0.0, globals@^9.2.0: version "9.14.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.14.0.tgz#8859936af0038741263053b39d0e76ca241e4034" @@ -1768,20 +1779,13 @@ js-tokens@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-2.0.0.tgz#79903f5563ee778cc1162e6dcf1a0027c97f9cb5" -js-yaml@3.6.1: +js-yaml@3.6.1, js-yaml@^3.5.1: version "3.6.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.6.1.tgz#6e5fe67d8b205ce4d22fad05b7781e8dadcc4b30" dependencies: argparse "^1.0.7" esprima "^2.6.0" -js-yaml@^3.5.1: - version "3.7.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" - dependencies: - argparse "^1.0.7" - esprima "^2.6.0" - jsbn@~0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.0.tgz#650987da0dd74f4ebf5a11377a2aa2d273e97dfd" @@ -1992,6 +1996,12 @@ mime-types@^2.1.11, mime-types@^2.1.12, mime-types@~2.1.7: dependencies: mime-db "~1.25.0" +min-document@^2.19.0: + version "2.19.0" + resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" + dependencies: + dom-walk "^0.1.0" + "minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" @@ -2285,6 +2295,10 @@ preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" +preset@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/preset/-/preset-1.0.0.tgz#ce840f89333fd323210ee0dedc4cedb51308d65b" + private@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/private/-/private-0.1.6.tgz#55c6a976d0f9bafb9924851350fe47b9b5fbb7c1" @@ -2293,6 +2307,10 @@ process-nextick-args@~1.0.6: version "1.0.7" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" +process@~0.5.1: + version "0.5.2" + resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf" + progress@^1.1.8: version "1.1.8" resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" From 112c9470b0f33fa8c0df1e83dc4df09c91c51f21 Mon Sep 17 00:00:00 2001 From: Chyroc Chen Date: Tue, 10 Jan 2017 21:18:47 +0800 Subject: [PATCH 2/3] fix unexpected , before } --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f102a66..e15195c 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "coverage": "nyc npm test && nyc report --reporter=text-lcov | coveralls" }, "dependencies": { - "isomorphic-fetch": "^2.2.1", + "isomorphic-fetch": "^2.2.1" }, "devDependencies": { "babel-cli": "^6.18.0", From 926a05b24c360c2642164505d7140f5b0938f04b Mon Sep 17 00:00:00 2001 From: Chyroc Chen Date: Tue, 10 Jan 2017 21:47:44 +0800 Subject: [PATCH 3/3] add skip for tdd test --- test/authorization.test.js | 6 +++--- test/connector.test.js | 2 +- test/driver.test.js | 2 +- test/job.test.js | 12 ++++++------ test/link.test.js | 8 ++++---- test/submission.test.js | 2 +- test/{utils.test.js => version.js} | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) rename test/{utils.test.js => version.js} (85%) diff --git a/test/authorization.test.js b/test/authorization.test.js index f146868..04e7722 100644 --- a/test/authorization.test.js +++ b/test/authorization.test.js @@ -8,15 +8,15 @@ import { Hasoop } from '../src/index' const sqoopClient = new Hasoop('') suite('authorization', () => { - test('createRole', () => { + test.skip('createRole', () => { sqoopClient.createRole() }) - test('deleteRole', () => { + test.skip('deleteRole', () => { sqoopClient.deleteRole() }) - test('getRole', () => { + test.skip('getRole', () => { sqoopClient.getRole() }) }) \ No newline at end of file diff --git a/test/connector.test.js b/test/connector.test.js index ccdde93..626b7c5 100644 --- a/test/connector.test.js +++ b/test/connector.test.js @@ -8,7 +8,7 @@ import { Hasoop } from '../src/index' const sqoopClient = new Hasoop('') suite('connector', () => { - test('getConnector', () => { + test.skip('getConnector', () => { sqoopClient.getConnector() }) diff --git a/test/driver.test.js b/test/driver.test.js index afe6dca..fbf3b9a 100644 --- a/test/driver.test.js +++ b/test/driver.test.js @@ -8,7 +8,7 @@ import { Hasoop } from '../src/index' const sqoopClient = new Hasoop('') suite('driver', () => { - test('getDriver', () => { + test.skip('getDriver', () => { sqoopClient.getDriver() }) diff --git a/test/job.test.js b/test/job.test.js index 3b7d03e..1ee2613 100644 --- a/test/job.test.js +++ b/test/job.test.js @@ -8,27 +8,27 @@ import { Hasoop } from '../src/index' const sqoopClient = new Hasoop('') suite('job', () => { - test('createJob', () => { + test.skip('createJob', () => { sqoopClient.createJob() }) - test('deleteJob', () => { + test.skip('deleteJob', () => { sqoopClient.deleteJob() }) - test('getJob', () => { + test.skip('getJob', () => { sqoopClient.getJob() }) - test('updateJob', () => { + test.skip('updateJob', () => { sqoopClient.updateJob() }) - test('startJob', () => { + test.skip('startJob', () => { sqoopClient.startJob() }) - test('stopJob', () => { + test.skip('stopJob', () => { sqoopClient.stopJob() }) }) \ No newline at end of file diff --git a/test/link.test.js b/test/link.test.js index 18980d8..f66c094 100644 --- a/test/link.test.js +++ b/test/link.test.js @@ -8,19 +8,19 @@ import { Hasoop } from '../src/index' const sqoopClient = new Hasoop('') suite('link', () => { - test('createLink', () => { + test.skip('createLink', () => { sqoopClient.createLink() }) - test('updateLink', () => { + test.skip('updateLink', () => { sqoopClient.updateLink() }) - test('deleteLink', () => { + test.skip('deleteLink', () => { sqoopClient.deleteLink() }) - test('getLink', () => { + test.skip('getLink', () => { sqoopClient.getLink() }) }) \ No newline at end of file diff --git a/test/submission.test.js b/test/submission.test.js index d15998f..a66fd2e 100644 --- a/test/submission.test.js +++ b/test/submission.test.js @@ -8,7 +8,7 @@ import { Hasoop } from '../src/index' const sqoopClient = new Hasoop('') suite('submission', () => { - test('getSubmission', () => { + test.skip('getSubmission', () => { sqoopClient.getSubmission() }) diff --git a/test/utils.test.js b/test/version.js similarity index 85% rename from test/utils.test.js rename to test/version.js index a5ee495..88ca064 100644 --- a/test/utils.test.js +++ b/test/version.js @@ -8,7 +8,7 @@ import { Hasoop } from '../src/index' const sqoopClient = new Hasoop('') suite('utils', () => { - test('getVersion', () => { + test.skip('getVersion', () => { sqoopClient.getVersion() })