Skip to content

Commit

Permalink
Address comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdobry committed Aug 26, 2016
1 parent 13eb3b9 commit 0b1edc0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pubsub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Commands:
create <topic> <name> Create a new subscription.
list [topic] List subscriptions.
pull <subscription> Pull messages from the specified subscription.
delete <subscription> Delete the specified dataset.
delete <subscription> Delete the specified subscription.
Options:
--help Show help [boolean]
Expand Down
2 changes: 1 addition & 1 deletion pubsub/subscriptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ cli
.command('pull <subscription>', 'Pull messages from the specified subscription.', {}, function (options) {
program.pullMessages(options.subscription, makeHandler(false));
})
.command('delete <subscription>', 'Delete the specified dataset.', {}, function (options) {
.command('delete <subscription>', 'Delete the specified subscription.', {}, function (options) {
program.deleteSubscription(options.subscription, makeHandler(false));
})
.example('node $0 create my-topic my-subscription', 'Create a new subscription.')
Expand Down
12 changes: 7 additions & 5 deletions storage/test/files.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@

var proxyquire = require('proxyquire').noCallThru();
var bucketName = 'foo';
var fileName = 'test.txt';
var fileName = 'test1.txt';
var movedFileName = 'test2.txt';
var copiedFileName = 'test3.txt';

function getSample () {
var filesMock = [
Expand Down Expand Up @@ -531,26 +533,26 @@ describe('storage:files', function () {
var program = getSample().program;

sinon.stub(program, 'moveFile');
program.main(['move', bucketName, fileName, fileName]);
program.main(['move', bucketName, fileName, movedFileName]);
assert.equal(program.moveFile.calledOnce, true);
assert.deepEqual(program.moveFile.firstCall.args.slice(0, -1), [{
bucket: bucketName,
srcFile: fileName,
destFile: fileName
destFile: movedFileName
}]);
});

it('should call copyFile', function () {
var program = getSample().program;

sinon.stub(program, 'copyFile');
program.main(['copy', bucketName, fileName, bucketName, fileName]);
program.main(['copy', bucketName, fileName, bucketName, copiedFileName]);
assert.equal(program.copyFile.calledOnce, true);
assert.deepEqual(program.copyFile.firstCall.args.slice(0, -1), [{
srcBucket: bucketName,
srcFile: fileName,
destBucket: bucketName,
destFile: fileName
destFile: copiedFileName
}]);
});
});
Expand Down
5 changes: 3 additions & 2 deletions storage/test/transfer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

var proxyquire = require('proxyquire').noCallThru();
var bucketName = 'foo';
var destBucketName = 'bar';
var jobName = 'transferJobs/123456789012345678';
var transferOperationName = 'transferOperations/123456789012345678';

Expand Down Expand Up @@ -484,11 +485,11 @@ describe('storage:transfer', function () {
var program = getSample().program;

sinon.stub(program, 'createTransferJob');
program.main(['jobs', 'create', bucketName, bucketName, 'time', 'date']);
program.main(['jobs', 'create', bucketName, destBucketName, 'time', 'date']);
assert.equal(program.createTransferJob.calledOnce, true);
assert.deepEqual(program.createTransferJob.firstCall.args.slice(0, -1), [{
srcBucket: bucketName,
destBucket: bucketName,
destBucket: destBucketName,
time: 'time',
date: 'date',
description: undefined
Expand Down

0 comments on commit 0b1edc0

Please sign in to comment.