Commit 29770bdb authored by Aral Balkan's avatar Aral Balkan
Browse files

Fix Order test; add support for Pebble domains to Order test

parent 379b7077
...@@ -19,8 +19,12 @@ async function setup() { ...@@ -19,8 +19,12 @@ async function setup() {
// Use npm test task for the former and npm run test-staging task for the latter. // Use npm test task for the former and npm run test-staging task for the latter.
const letsEncryptServerType = process.env.STAGING ? LetsEncryptServer.type.STAGING : LetsEncryptServer.type.PEBBLE const letsEncryptServerType = process.env.STAGING ? LetsEncryptServer.type.STAGING : LetsEncryptServer.type.PEBBLE
let domains = [os.hostname(), `www.${os.hostname()}`]
// If we’re running on pebble, test with localhost.
if (letsEncryptServerType === LetsEncryptServer.type.PEBBLE) { if (letsEncryptServerType === LetsEncryptServer.type.PEBBLE) {
await Pebble.ready() await Pebble.ready()
domains = ['localhost']
} }
test.onFinish(async () => { test.onFinish(async () => {
...@@ -35,7 +39,7 @@ async function setup() { ...@@ -35,7 +39,7 @@ async function setup() {
fs.removeSync(customSettingsPath) fs.removeSync(customSettingsPath)
const configuration = new Configuration({ const configuration = new Configuration({
domains: [os.hostname(), `www.${os.hostname()}`], domains,
server: new LetsEncryptServer(letsEncryptServerType), server: new LetsEncryptServer(letsEncryptServerType),
settingsPath: customSettingsPath settingsPath: customSettingsPath
}) })
...@@ -49,8 +53,7 @@ async function setup() { ...@@ -49,8 +53,7 @@ async function setup() {
return { configuration, accountIdentity } return { configuration, accountIdentity }
} }
test('Order', t => { test('Order', async t => {
t.plan(10)
const { configuration, accountIdentity } = await setup() const { configuration, accountIdentity } = await setup()
const order = await Order.getInstanceAsync(configuration, accountIdentity) const order = await Order.getInstanceAsync(configuration, accountIdentity)
...@@ -68,6 +71,5 @@ test('Order', t => { ...@@ -68,6 +71,5 @@ test('Order', t => {
`trying to set read-only property ${readOnlySetter} throws` `trying to set read-only property ${readOnlySetter} throws`
) )
}) })
t.pass()
t.end() t.end()
}) })
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment