Commit 1e329060 authored by Aral Balkan's avatar Aral Balkan
Browse files

Improve tests

  - Remove hard-coding of one test to my dev URL
  - Display error message properly in another
parent 2010883c
......@@ -55,11 +55,12 @@ test('Auto Encrypt', async t => {
//
const server0 = AutoEncrypt.createServer(() => {})
const hostname = os.hostname()
const expectedProductionServerDetails = dehydrate(`
# AutoEncrypt (static class)
- Using Let’s Encrypt production server.
- Managing TLS for dev.ar.al, www.dev.ar.al (default domains).
- Managing TLS for ${hostname}, www.${hostname} (default domains).
- Settings stored at default settings path.
- Listener is set.
`)
......@@ -78,7 +79,6 @@ test('Auto Encrypt', async t => {
const testSettingsPath = createTestSettingsPath()
const hostname = os.hostname()
let options = {
domains: [hostname],
serverType: letsEncryptServerType,
......@@ -159,7 +159,7 @@ test('Auto Encrypt', async t => {
const domainToHit = isPebble ? 'localhost' : hostname
sniCallback(domainToHit, (error, secureContext) => {
if (error) {
t.fail('SNI Callback should not error, but it did: ${error}')
t.fail(`SNI Callback should not error, but it did: ${error}`)
reject()
return
}
......
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