mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
476 B
18 lines
476 B
11 years ago
|
var test = require('tap').test
|
||
|
var npmconf = require('../npmconf.js')
|
||
|
var common = require('./00-setup.js')
|
||
|
var path = require('path')
|
||
|
var fs = require('fs')
|
||
|
|
||
|
test('cafile loads as ca', function (t) {
|
||
|
var cafile = path.join(__dirname, 'fixtures', 'multi-ca')
|
||
|
|
||
|
npmconf.load({cafile: cafile}, function (er, conf) {
|
||
|
if (er) throw er
|
||
|
|
||
|
t.same(conf.get('cafile'), cafile)
|
||
|
t.same(conf.get('ca').join('\n'), fs.readFileSync(cafile, 'utf8').trim())
|
||
|
t.end()
|
||
|
})
|
||
|
})
|