Skip to content

Commit

Permalink
feat: Added --timeout option for signing
Browse files Browse the repository at this point in the history
  • Loading branch information
sharang-d committed Apr 30, 2016
1 parent 982d5c5 commit 2c176b2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cmd/sign.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const log = createLogger(__filename);

export default function sign(
{verbose, sourceDir, artifactsDir, apiKey, apiSecret,
apiUrlPrefix}: Object,
apiUrlPrefix, timeout}: Object,
{build=defaultBuilder, signAddon=defaultAddonSigner,
preValidatedManifest=null}: Object = {}): Promise {

Expand All @@ -38,6 +38,7 @@ export default function sign(
apiKey,
apiSecret,
apiUrlPrefix,
timeout,
verbose,
xpiPath: buildResult.extensionPath,
id: manifestData.applications.gecko.id,
Expand Down
4 changes: 4 additions & 0 deletions src/program.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ Example: $0 --help run.
demand: true,
type: 'string',
},
'timeout' : {
describe: 'Number of milleseconds to wait before giving up',
type: 'number',
},
})
.command('run', 'Run the web extension', commands.run, {
'firefox-binary': {
Expand Down
3 changes: 3 additions & 0 deletions tests/test-cmd/test.sign.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ describe('sign', () => {
apiKey: 'AMO JWT issuer',
apiSecret: 'AMO JWT secret',
apiUrlPrefix: 'http://not-the-real-amo.com/api/v3',
timeout: 999,
};

const buildResult = {
Expand Down Expand Up @@ -102,6 +103,8 @@ describe('sign', () => {
stubs.signingConfig.apiSecret);
assert.equal(signedAddonCall.apiUrlPrefix,
stubs.signingConfig.apiUrlPrefix);
assert.equal(signedAddonCall.timeout,
stubs.signingConfig.timeout);
assert.equal(signedAddonCall.xpiPath,
stubs.buildResult.extensionPath);
assert.equal(signedAddonCall.id,
Expand Down

0 comments on commit 2c176b2

Please sign in to comment.