diff options
author | Forrest L Norvell <forrest@npmjs.com> | 2015-07-10 00:19:49 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2015-07-10 01:38:57 +0300 |
commit | 7a649a020fb35017bc29525710e159f5c705a490 (patch) | |
tree | 47f23213ef9bc6f004961a2dd375a8f75050925d /test | |
parent | e8352954ac0d34bd34b0886aa264f549282fc5e5 (diff) |
test: don't prompt for GnuPG passphrase
Diffstat (limited to 'test')
-rw-r--r-- | test/tap/version-git-not-clean.js | 45 | ||||
-rw-r--r-- | test/tap/version-lifecycle.js | 8 |
2 files changed, 27 insertions, 26 deletions
diff --git a/test/tap/version-git-not-clean.js b/test/tap/version-git-not-clean.js index a942be3e8..22ffb7c98 100644 --- a/test/tap/version-git-not-clean.js +++ b/test/tap/version-git-not-clean.js @@ -56,28 +56,29 @@ test('npm version <semver> with working directory not clean', function (t) { }) test('npm version <semver> --force with working directory not clean', function (t) { - npm.load({ cache: cache, registry: common.registry, prefix: pkg }, function () { - common.npm( - [ - '--force', - 'version', - 'patch' - ], - {cwd: pkg, env: {PATH: process.env.PATH}}, - function (err, code, stdout, stderr) { - t.ifError(err, 'npm version ran without issue') - t.notOk(code, 'exited with a non-error code') - var errorLines = stderr.trim().split('\n') - .map(function (line) { - return line.trim() - }) - .filter(function (line) { - return !line.indexOf('using --force') - }) - t.notOk(errorLines.length, 'no error output') - t.end() - }) - }) + common.npm( + [ + '--force', + '--no-sign-git-tag', + '--registry', common.registry, + '--prefix', pkg, + 'version', + 'patch' + ], + { cwd: pkg, env: {PATH: process.env.PATH} }, + function (err, code, stdout, stderr) { + t.ifError(err, 'npm version ran without issue') + t.notOk(code, 'exited with a non-error code') + var errorLines = stderr.trim().split('\n') + .map(function (line) { + return line.trim() + }) + .filter(function (line) { + return !line.indexOf('using --force') + }) + t.notOk(errorLines.length, 'no error output') + t.end() + }) }) test('cleanup', function (t) { diff --git a/test/tap/version-lifecycle.js b/test/tap/version-lifecycle.js index 7cf719c4f..5d78b71d5 100644 --- a/test/tap/version-lifecycle.js +++ b/test/tap/version-lifecycle.js @@ -26,7 +26,7 @@ test('npm version <semver> with failing preversion lifecycle script', function ( }), 'utf8') fs.writeFileSync(path.resolve(pkg, 'fail.sh'), 'exit 50', 'utf8') fs.chmodSync(path.resolve(pkg, 'fail.sh'), 448) - npm.load({cache: cache, registry: common.registry}, function () { + npm.load({cache: cache, 'sign-git-tag': false, registry: common.registry}, function () { var version = require('../../lib/version') version(['patch'], function (err) { t.ok(err) @@ -49,7 +49,7 @@ test('npm version <semver> with failing version lifecycle script', function (t) }), 'utf8') fs.writeFileSync(path.resolve(pkg, 'fail.sh'), 'exit 50', 'utf8') fs.chmodSync(path.resolve(pkg, 'fail.sh'), 448) - npm.load({cache: cache, registry: common.registry}, function () { + npm.load({cache: cache, 'sign-git-tag': false, registry: common.registry}, function () { var version = require('../../lib/version') version(['patch'], function (err) { t.ok(err) @@ -72,7 +72,7 @@ test('npm version <semver> with failing postversion lifecycle script', function }), 'utf8') fs.writeFileSync(path.resolve(pkg, 'fail.sh'), 'exit 50', 'utf8') fs.chmodSync(path.resolve(pkg, 'fail.sh'), 448) - npm.load({cache: cache, registry: common.registry}, function () { + npm.load({cache: cache, 'sign-git-tag': false, registry: common.registry}, function () { var version = require('../../lib/version') version(['patch'], function (err) { t.ok(err) @@ -98,7 +98,7 @@ test('npm version <semver> execution order', function (t) { makeScript('preversion') makeScript('version') makeScript('postversion') - npm.load({cache: cache, registry: common.registry}, function () { + npm.load({cache: cache, 'sign-git-tag': false, registry: common.registry}, function () { common.makeGitRepo({path: pkg}, function (err, git) { t.ifError(err, 'git bootstrap ran without error') |