Files
shields/services/jira/jira-test-helpers.js
Paul Melnikow fa5309400d PaaS, CI, and production-friendly config (#2626)
This implements the configuration mechanism I described in #2621. The heavy lifting is delegated to [node-config](https://github.com/lorenwest/node-config) with a minor assist from [dotenv](https://github.com/motdotla/dotenv).

`private/secret.json` has been replaced with environment variables and/or `config/local.yml`. See `doc/server-secrets.md`.
2019-01-06 10:42:09 -05:00

26 lines
475 B
JavaScript

'use strict'
const sinon = require('sinon')
const serverSecrets = require('../../lib/server-secrets')
const user = 'admin'
const pass = 'password'
function mockJiraCreds() {
serverSecrets['jira_user'] = undefined
serverSecrets['jira_pass'] = undefined
sinon.stub(serverSecrets, 'jira_user').value(user)
sinon.stub(serverSecrets, 'jira_pass').value(pass)
}
function restore() {
sinon.restore()
}
module.exports = {
user,
pass,
mockJiraCreds,
restore,
}