YUKI Hiroshi
null+****@clear*****
Thu Nov 8 14:17:56 JST 2012
YUKI Hiroshi 2012-11-08 14:17:56 +0900 (Thu, 08 Nov 2012) New Revision: 54a884a27ae82e0364904f7d7944f4963b9da2fe https://github.com/groonga/gcs/commit/54a884a27ae82e0364904f7d7944f4963b9da2fe Log: * --base-host and --port should be available only on "gcs" * --base-host for client commands is renamed to "--endpoint" which is same to cs-commands * --endpoint for gcs-post-sdf is renamed to --document-endpoint Modified files: bin/gcs bin/gcs-configure-default-search-field bin/gcs-configure-fields bin/gcs-configure-text-options bin/gcs-create-domain bin/gcs-delete-domain bin/gcs-describe-domain bin/gcs-index-documents bin/gcs-post-sdf lib/command-line.js test/gcs-commands.test.js Modified: bin/gcs (+12 -0) =================================================================== --- bin/gcs 2012-11-08 13:55:14 +0900 (d5654b9) +++ bin/gcs 2012-11-08 14:17:56 +0900 (be13cda) @@ -11,6 +11,18 @@ commandLine '[' + CLI.defaultDatabasePath + ']', String, CLI.defaultDatabasePath) + .option('--base-host <hostname>', + 'The base host name assigned to the service ' + + '(GCS_BASE_HOST) ' + + '[' + CLI.defaultBaseHost + ']', + String, + CLI.defaultBaseHost) + .option('-p, --port <port>', + 'The port number assigned to the service' + + '(GCS_PORT) ' + + '[' + CLI.defaultPort + ']', + Number, + 0) .option('--privilege <ip range>', 'list of IP ranges for privileged client ' + '(GCS_PRIVILEGED_RANGES) ' + Modified: bin/gcs-configure-default-search-field (+1 -1) =================================================================== --- bin/gcs-configure-default-search-field 2012-11-08 13:55:14 +0900 (7b615ab) +++ bin/gcs-configure-default-search-field 2012-11-08 14:17:56 +0900 (926a066) @@ -12,7 +12,7 @@ commandLine 'The name of the field you want to set as the default search field. ' + 'It becomes blank if you omit this option', String) - .parse(); + .parseClient(); var client = new Client(commandLine); Modified: bin/gcs-configure-fields (+1 -1) =================================================================== --- bin/gcs-configure-fields 2012-11-08 13:55:14 +0900 (fbacf47) +++ bin/gcs-configure-fields 2012-11-08 14:17:56 +0900 (07a77ca) @@ -28,7 +28,7 @@ commandLine 'Delete the field specified by the --name and --type options.') .option('-f, --force', /* this is an extension of gcs-command */ 'Delete the domain without prompting for confirmation.') - .parse(); + .parseClient(); var client = new Client(commandLine); Modified: bin/gcs-configure-text-options (+1 -1) =================================================================== --- bin/gcs-configure-text-options 2012-11-08 13:55:14 +0900 (d31ae3c) +++ bin/gcs-configure-text-options 2012-11-08 14:17:56 +0900 (7dd9ba3) @@ -39,7 +39,7 @@ commandLine 'List the domain\'s stopwords.') .option('-psn, --print-synonyms', 'List the domain\'s synonyms.') - .parse(); + .parseClient(); function strip(string) { return string.replace(/^\s+|\s+$/g, ''); Modified: bin/gcs-create-domain (+1 -1) =================================================================== --- bin/gcs-create-domain 2012-11-08 13:55:14 +0900 (64b2700) +++ bin/gcs-create-domain 2012-11-08 14:17:56 +0900 (c60833c) @@ -9,7 +9,7 @@ commandLine .option('-d, --domain-name <domain name>', 'The name of the domain that you are creating. Required.', String) - .parse(); + .parseClient(); var client = new Client(commandLine); Modified: bin/gcs-delete-domain (+1 -1) =================================================================== --- bin/gcs-delete-domain 2012-11-08 13:55:14 +0900 (d744ef0) +++ bin/gcs-delete-domain 2012-11-08 14:17:56 +0900 (a39296e) @@ -11,7 +11,7 @@ commandLine String) .option('-f, --force', 'Delete the domain without prompting for confirmation.') - .parse(); + .parseClient(); var client = new Client(commandLine); Modified: bin/gcs-describe-domain (+1 -1) =================================================================== --- bin/gcs-describe-domain 2012-11-08 13:55:14 +0900 (f44075a) +++ bin/gcs-describe-domain 2012-11-08 14:17:56 +0900 (10f7554) @@ -12,7 +12,7 @@ commandLine 'Display all available information for the domain, ' + 'including configured fields.', String) - .parse(); + .parseClient(); var client = new Client(commandLine); Modified: bin/gcs-index-documents (+1 -1) =================================================================== --- bin/gcs-index-documents 2012-11-08 13:55:14 +0900 (662eb24) +++ bin/gcs-index-documents 2012-11-08 14:17:56 +0900 (600dea2) @@ -9,7 +9,7 @@ commandLine .option('-d, --domain-name <domain name>', 'The name of the domain that you are indexing. Required.', String) - .parse(); + .parseClient(); var client = new Client(commandLine); Modified: bin/gcs-post-sdf (+5 -5) =================================================================== --- bin/gcs-post-sdf 2012-11-08 13:55:14 +0900 (b2d1ede) +++ bin/gcs-post-sdf 2012-11-08 14:17:56 +0900 (792620a) @@ -8,7 +8,6 @@ var path = require('path'); var commandLine = new CLI(); commandLine .usage('--source <path to SDF file> ' + - '--endpoint <host:port> ' + '[options]') .option('-s, --source <path to SDF file>', 'The path to a file which contains the SDF data you want to upload.', @@ -16,13 +15,14 @@ commandLine .option('-d, --domain-name <domain name>', 'The name of the domain that you are updating. Required.', String) - .option('--endpoint <host:port>', - 'The host and port number of the documents/batch API. Required.', + .option('--document-endpoint <host:port>', + 'The host and port number of the documents/batch API.', String) - .parse(); + .parseClient(); var client = new Client(commandLine); -client.docEndpoint = commandLine.options.endpoint; +if (commandLine.options.documentEndpoint) + client.docEndpoint = commandLine.options.documentEndpoint; client.assertHaveDomainName(); client.assertDomainExists(function() { Modified: lib/command-line.js (+20 -16) =================================================================== --- lib/command-line.js 2012-11-08 13:55:14 +0900 (8f6a2ee) +++ lib/command-line.js 2012-11-08 14:17:56 +0900 (b342b42) @@ -21,6 +21,10 @@ var defaultBaseHost = exports.defaultBaseHost = CommandLineInterface.defaultBaseHost = process.env.GCS_BASE_HOST || '127.0.0.1.xip.io:' + defaultPort; +var defaultEndpoint = + exports.defaultEndpoint = + CommandLineInterface.defaultEndpoint = + defaultBaseHost; var defaultPrivilegedRanges = exports.defaultPrivilegedRanges = CommandLineInterface.defaultPrivilegedRanges = @@ -37,10 +41,12 @@ CommandLineInterface.prototype = { return this.options.domainName; }, get host() { - return this.options.baseHost.split(':')[0]; + return (this.options.baseHost || this.options.endpoint).split(':')[0]; }, get port() { - return this.options.port || Number(this.options.baseHost.split(':')[1] || 0) || defaultPort; + return this.options.port || + Number((this.options.baseHost || this.options.endpoint).split(':')[1] || 0) || + defaultPort; }, get baseHost() { return this.host + ':' + this.port; @@ -54,7 +60,7 @@ CommandLineInterface.prototype = { return this.program; }, - parse: function() { + parse: function(asClient) { this.program.version(version); if (this.reservedUsage) @@ -66,24 +72,22 @@ CommandLineInterface.prototype = { this.program.option.apply(this.program, optionArguments); }, this); - this.program - .option('-p, --port <port>', - 'specify port' + - '(GCS_PORT) ' + - '[' + defaultPort + ']', - Number, - 0) - .option('--base-host <hostname>', - 'The base host name assigned to the service ' + - '(GCS_BASE_HOST) ' + - '[' + defaultBaseHost + ']', - String, - defaultBaseHost); + if (asClient) { + this.program + .option('-e, --endpoint <hostname:port>', + 'The host name (and port) to access the configuration API ' + + '[' + defaultEndpoint + ']', + String, + defaultEndpoint); + } this.program.parse(process.argv); return this; }, + parseClient: function() { + return this.parse(true); + }, usage: function() { this.reservedUsage = Array.prototype.slice.call(arguments, 0) return this; Modified: test/gcs-commands.test.js (+59 -59) =================================================================== --- test/gcs-commands.test.js 2012-11-08 13:55:14 +0900 (aa06b00) +++ test/gcs-commands.test.js 2012-11-08 14:17:56 +0900 (63e80b6) @@ -47,7 +47,7 @@ suite('gcs-create-domain', function() { utils .run('gcs-create-domain', '--domain-name', 'test', - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { assert.equal(result.code, 0, result.output.stdout + '\n' + result.output.stderr); assert.include(result.output.stdout, @@ -69,7 +69,7 @@ suite('gcs-create-domain', function() { utils .run('gcs-create-domain', '--domain-name', 'test', - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { assert.deepEqual({ code: result.code, message: result.output.stdout }, @@ -93,7 +93,7 @@ suite('gcs-create-domain', function() { test('missing domain name', function(done) { utils .run('gcs-create-domain', - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { assertDomainNotSpecified(result); @@ -118,7 +118,7 @@ suite('gcs-delete-domain', function() { .run('gcs-delete-domain', '--domain-name', 'test', '--force', - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { assert.deepEqual({ code: result.code, message: result.output.stdout }, @@ -142,7 +142,7 @@ suite('gcs-delete-domain', function() { .run('gcs-delete-domain', '--domain-name', 'test', '--force', - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { assertDomainNotExist(result, 'test'); done(); @@ -156,7 +156,7 @@ suite('gcs-delete-domain', function() { utils .run('gcs-delete-domain', '--force', - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { assertDomainNotSpecified(result); done(); @@ -181,7 +181,7 @@ suite('gcs-describe-domain', function() { utils .run('gcs-describe-domain', '--domain-name', 'domain1', - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { var domain = new Domain('domain1', context); assert.deepEqual({ code: result.code, message: result.output.stdout }, @@ -221,7 +221,7 @@ suite('gcs-describe-domain', function() { utils .run('gcs-describe-domain', '--show-all', - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { var domain1 = new Domain('domain1', context); var domain2 = new Domain('domain2', context); @@ -292,12 +292,12 @@ suite('gcs-configure-fields', function() { utils .run('gcs-create-domain', '--domain-name', 'companies', - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .run('gcs-configure-fields', '--domain-name', 'companies', '--name', name, '--type', type, - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { assertSuccess(result, name, type, options); @@ -335,7 +335,7 @@ suite('gcs-configure-fields', function() { '--name', name, '--delete', '--force', - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { assert.deepEqual({ code: result.code, message: result.output.stdout }, @@ -375,7 +375,7 @@ suite('gcs-configure-fields', function() { '--domain-name', 'companies', '--name', name, '--type', type, - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { assert.deepEqual({ code: result.code, message: result.output.stdout }, @@ -407,7 +407,7 @@ suite('gcs-configure-fields', function() { '--name', 'name', '--delete', '--force', - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { assert.deepEqual({ code: result.code, message: result.output.stdout }, @@ -427,7 +427,7 @@ suite('gcs-configure-fields', function() { .run('gcs-configure-fields', '--domain-name', 'companies', '--name', 'name', - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { assert.deepEqual({ code: result.code, message: result.output.stdout }, @@ -445,7 +445,7 @@ suite('gcs-configure-fields', function() { utils .run('gcs-configure-fields', '--name', 'name', - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { assertDomainNotSpecified(result); done(); @@ -486,7 +486,7 @@ suite('gcs-configure-fields', function() { '--domain-name', 'companies', '--name', name, '--option', 'search', - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { if (results.search == 'error') assertOptionNotConfigurable(result, 'search', type); @@ -497,7 +497,7 @@ suite('gcs-configure-fields', function() { '--domain-name', 'companies', '--name', name, '--option', 'nosearch', - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { if (results.nosearch == 'error') assertOptionNotConfigurable(result, 'nosearch', type); @@ -508,7 +508,7 @@ suite('gcs-configure-fields', function() { '--domain-name', 'companies', '--name', name, '--option', 'result', - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { if (results.result == 'error') assertOptionNotConfigurable(result, 'result', type); @@ -519,7 +519,7 @@ suite('gcs-configure-fields', function() { '--domain-name', 'companies', '--name', name, '--option', 'noresult', - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { if (results.noresult == 'error') assertOptionNotConfigurable(result, 'noresult', type); @@ -530,7 +530,7 @@ suite('gcs-configure-fields', function() { '--domain-name', 'companies', '--name', name, '--option', 'facet', - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { if (results.facet == 'error') assertOptionNotConfigurable(result, 'facet', type); @@ -541,7 +541,7 @@ suite('gcs-configure-fields', function() { '--domain-name', 'companies', '--name', name, '--option', 'nofacet', - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { if (results.nofacet == 'error') assertOptionNotConfigurable(result, 'nofacet', type); @@ -598,7 +598,7 @@ suite('gcs-configure-text-options', function() { .run('gcs-configure-text-options', '--domain-name', 'companies', '--synonyms', path.join(__dirname, 'fixtures', 'synonyms.txt'), - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { assert.deepEqual({ code: result.code, message: result.output.stdout }, @@ -617,7 +617,7 @@ suite('gcs-configure-text-options', function() { .run('gcs-configure-text-options', '--domain-name', 'companies', '--synonyms', path.join(__dirname, 'fixtures', 'synonyms.txt'), - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { assertDomainNotExist(result, 'companies'); done(); @@ -631,7 +631,7 @@ suite('gcs-configure-text-options', function() { utils .run('gcs-configure-text-options', '--synonyms', path.join(__dirname, 'fixtures', 'synonyms.txt'), - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { assertDomainNotSpecified(result); done(); @@ -652,7 +652,7 @@ suite('gcs-configure-text-options', function() { .run('gcs-configure-text-options', '--domain-name', 'companies', '--print-synonyms', - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { assert.deepEqual({ code: result.code, message: result.output.stdout }, @@ -672,7 +672,7 @@ suite('gcs-configure-text-options', function() { .run('gcs-configure-text-options', '--domain-name', 'companies', '--print-synonyms', - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { assertDomainNotExist(result, 'companies'); done(); @@ -686,7 +686,7 @@ suite('gcs-configure-text-options', function() { utils .run('gcs-configure-text-options', '--print-synonyms', - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { assertDomainNotSpecified(result); done(); @@ -708,7 +708,7 @@ suite('gcs-configure-default-search-field', function() { .run('gcs-configure-default-search-field', '--domain-name', 'companies', '--name', 'name', - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { assert.deepEqual({ code: result.code, message: result.output.stdout }, @@ -732,11 +732,11 @@ suite('gcs-configure-default-search-field', function() { .run('gcs-configure-default-search-field', '--domain-name', 'companies', '--name', 'name', - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .run('gcs-configure-default-search-field', '--domain-name', 'companies', '--name', 'address', - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { assert.deepEqual({ code: result.code, message: result.output.stdout }, @@ -758,11 +758,11 @@ suite('gcs-configure-default-search-field', function() { .run('gcs-configure-default-search-field', '--domain-name', 'companies', '--name', 'name', - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .run('gcs-configure-default-search-field', '--domain-name', 'companies', '--name', '', - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { assert.deepEqual({ code: result.code, message: result.output.stdout }, @@ -787,10 +787,10 @@ suite('gcs-configure-default-search-field', function() { .run('gcs-configure-default-search-field', '--domain-name', 'companies', '--name', 'name', - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .run('gcs-configure-default-search-field', '--domain-name', 'companies', - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { assert.deepEqual({ code: result.code, message: result.output.stdout }, @@ -815,10 +815,10 @@ suite('gcs-configure-default-search-field', function() { .run('gcs-configure-default-search-field', '--domain-name', 'companies', '--name', 'name', - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .run('gcs-describe-domain', '--domain-name', 'companies', - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { assert.equal(result.code, 0, result.output.stdout + result.output.stderr); console.log(result.output.stdout); @@ -845,7 +845,7 @@ suite('gcs-index-documents', function() { utils .run('gcs-index-documents', '--domain-name', 'companies', - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { assert.deepEqual({ code: result.code, message: result.output.stdout }, @@ -872,7 +872,7 @@ suite('gcs-index-documents', function() { utils .run('gcs-index-documents', '--domain-name', 'test', - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { assertDomainNotExist(result, 'test'); done(); @@ -885,7 +885,7 @@ suite('gcs-index-documents', function() { test('reindex without domain', function(done) { utils .run('gcs-index-documents', - '--base-host', 'localhost:' + utils.testPort) + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { assertDomainNotSpecified(result); done(); @@ -922,8 +922,8 @@ suite('gcs-post-sdf', function() { .run('gcs-post-sdf', '--domain-name', 'companies', '--source', batchFile, - '--endpoint', endpoint, - '--base-host', 'localhost:' + utils.testPort) + '--document-endpoint', endpoint, + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { assert.deepEqual({ code: result.code, message: result.output.stdout }, @@ -950,8 +950,8 @@ suite('gcs-post-sdf', function() { .run('gcs-post-sdf', '--domain-name', 'companies', '--source', batchFile, - '--endpoint', endpoint, - '--base-host', 'localhost:' + utils.testPort) + '--document-endpoint', endpoint, + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { assert.deepEqual({ code: result.code, message: result.output.stdout }, @@ -980,8 +980,8 @@ suite('gcs-post-sdf', function() { .run('gcs-post-sdf', '--domain-name', 'companies', '--source', path.join(fixturesDirectory, 'add.sdf.json'), - '--endpoint', endpoint, - '--base-host', 'localhost:' + utils.testPort) + '--document-endpoint', endpoint, + '--endpoint', 'localhost:' + utils.testPort) */ .post('/2011-02-01/documents/batch', addBatch, { 'Content-Type': 'application/json', @@ -1002,8 +1002,8 @@ suite('gcs-post-sdf', function() { .run('gcs-post-sdf', '--domain-name', 'companies', '--source', deleteBatchFile, - '--endpoint', endpoint, - '--base-host', 'localhost:' + utils.testPort) + '--document-endpoint', endpoint, + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { assert.deepEqual({ code: result.code, message: result.output.stdout }, @@ -1030,8 +1030,8 @@ suite('gcs-post-sdf', function() { .run('gcs-post-sdf', '--domain-name', 'companies', '--source', batchFile, - '--endpoint', endpoint, - '--base-host', 'localhost:' + utils.testPort) + '--document-endpoint', endpoint, + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { assert.deepEqual({ code: result.code, message: result.output.stdout }, @@ -1064,8 +1064,8 @@ suite('gcs-post-sdf', function() { utils .run('gcs-post-sdf', '--domain-name', 'companies', - '--endpoint', endpoint, - '--base-host', 'localhost:' + utils.testPort) + '--document-endpoint', endpoint, + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { assert.deepEqual({ code: result.code, message: result.output.stdout }, @@ -1086,8 +1086,8 @@ suite('gcs-post-sdf', function() { .run('gcs-post-sdf', '--domain-name', 'companies', '--source', batchFile, - '--endpoint', endpoint, - '--base-host', 'localhost:' + utils.testPort) + '--document-endpoint', endpoint, + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { assert.deepEqual({ code: result.code, message: result.output.stdout }, @@ -1109,8 +1109,8 @@ suite('gcs-post-sdf', function() { .run('gcs-post-sdf', '--domain-name', 'companies', '--source', batchFile, - '--endpoint', endpoint, - '--base-host', 'localhost:' + utils.testPort) + '--document-endpoint', endpoint, + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { assert.deepEqual({ code: result.code, message: result.output.stdout }, @@ -1131,8 +1131,8 @@ suite('gcs-post-sdf', function() { .run('gcs-post-sdf', '--domain-name', 'test', '--source', batchFile, - '--endpoint', endpoint, - '--base-host', 'localhost:' + utils.testPort) + '--document-endpoint', endpoint, + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { assertDomainNotExist(result, 'test'); done(); @@ -1145,8 +1145,8 @@ suite('gcs-post-sdf', function() { test('post without domain', function(done) { utils .run('gcs-post-sdf', - '--endpoint', endpoint, - '--base-host', 'localhost:' + utils.testPort) + '--document-endpoint', endpoint, + '--endpoint', 'localhost:' + utils.testPort) .next(function(result) { assertDomainNotSpecified(result); done(); -------------- next part -------------- HTML����������������������������...Download