-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix: allow keychain interactions without a password #1548
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ module.exports = { | |
if (err) { | ||
throw err | ||
} | ||
print(`generated ${key.id} ${key.name}`) | ||
print(key.id) | ||
}) | ||
} | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ const expect = require('chai').expect | |
const runOnAndOff = require('../utils/on-and-off') | ||
const hat = require('hat') | ||
|
||
describe('key', () => runOnAndOff.off((thing) => { | ||
describe.only('key', () => runOnAndOff.off((thing) => { | ||
const name = 'test-key-' + hat() | ||
const newName = 'test-key-' + hat() | ||
const pass = '--pass ' + hat() | ||
|
@@ -19,6 +19,7 @@ describe('key', () => runOnAndOff.off((thing) => { | |
this.timeout(40 * 1000) | ||
|
||
return ipfs(`${pass} key gen ${name} --type rsa --size 2048`) | ||
.then(() => ipfs(`${pass} key list -l`)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change changes the assertion as now it's testing on the output of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
$ jsipfs key gen foobar
generated Qmb1Wj3YR4PGgscvXJ3JgaiX6GCQFXLwP6Qo7c5kNR6PQK foobar but to bring it inline with $ jsipfs key gen foobar
Qmb1Wj3YR4PGgscvXJ3JgaiX6GCQFXLwP6Qo7c5kNR6PQK so the name is no longer in the output and the test would fail. In order to verify that we have generated a key with the passed name, I changed the test to examine the output of |
||
.then((out) => { | ||
expect(out).to.include(name) | ||
}) | ||
|
@@ -33,6 +34,15 @@ describe('key', () => runOnAndOff.off((thing) => { | |
}) | ||
}) | ||
|
||
it('list without password', function () { | ||
this.timeout(20 * 1000) | ||
|
||
return ipfs(`key list`) | ||
.then((out) => { | ||
expect(out).to.include(name) | ||
}) | ||
}) | ||
|
||
it('rename', function () { | ||
this.timeout(20 * 1000) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reminder to remove this before merge ;)