Commit 6c7ae6d9 authored by Aral Balkan's avatar Aral Balkan
Browse files

Clean up the tests a bit

(Still needs more work; lots of redundancy in there…)
parent 079e4787
......@@ -2,7 +2,6 @@ import os from 'os'
import fs from 'fs-extra'
import path from 'path'
import test from 'tape'
// import NewOrderRequest from '../../../lib/acme-requests/NewOrderRequest.js'
import Directory from '../../../lib/Directory.js'
import Account from '../../../lib/Account.js'
import AccountIdentity from '../../../lib/identities/AccountIdentity.js'
......@@ -12,6 +11,8 @@ import LetsEncryptServer from '../../../lib/LetsEncryptServer.js'
import { symbolOfErrorThrownByAsync } from '../../../lib/test-helpers/index.js'
import Pebble from '@small-tech/node-pebble'
import AuthorisationRequest from '../../../lib/acme-requests/AuthorisationRequest.js'
async function setup() {
// Run the tests using either a local Pebble server (default) or the Let’s Encrypt Staging server
// (which is subject to rate limits) if the STAGING environment variable is set.
......@@ -50,10 +51,6 @@ async function setup() {
}
// import test from 'tape'
import AuthorisationRequest from '../../../lib/acme-requests/AuthorisationRequest.js'
// import { symbolOfErrorThrownByAsync } from '../../../lib/test-helpers/index.js'
test('Authorisation Request', async t => {
const configuration = await setup()
......
......@@ -11,6 +11,8 @@ import LetsEncryptServer from '../../../lib/LetsEncryptServer.js'
import { symbolOfErrorThrownByAsync } from '../../../lib/test-helpers/index.js'
import Pebble from '@small-tech/node-pebble'
import CertificateRequest from '../../../lib/acme-requests/CertificateRequest.js'
async function setup() {
// Run the tests using either a local Pebble server (default) or the Let’s Encrypt Staging server
// (which is subject to rate limits) if the STAGING environment variable is set.
......@@ -49,10 +51,6 @@ async function setup() {
}
// import test from 'tape'
import CertificateRequest from '../../../lib/acme-requests/CertificateRequest.js'
// import { symbolOfErrorThrownByAsync } from '../../../lib/test-helpers/index.js'
test('Authorisation Request', async t => {
const configuration = await setup()
......
......@@ -11,6 +11,8 @@ import LetsEncryptServer from '../../../lib/LetsEncryptServer.js'
import { symbolOfErrorThrownByAsync } from '../../../lib/test-helpers/index.js'
import Pebble from '@small-tech/node-pebble'
import CheckOrderStatusRequest from '../../../lib/acme-requests/CheckOrderStatusRequest.js'
async function setup() {
// Run the tests using either a local Pebble server (default) or the Let’s Encrypt Staging server
// (which is subject to rate limits) if the STAGING environment variable is set.
......@@ -49,10 +51,6 @@ async function setup() {
}
// import test from 'tape'
import CheckOrderStatusRequest from '../../../lib/acme-requests/CheckOrderStatusRequest.js'
// import { symbolOfErrorThrownByAsync } from '../../../lib/test-helpers/index.js'
test('Check Order Status Request', async t => {
const configuration = await setup()
......
......@@ -11,6 +11,8 @@ import LetsEncryptServer from '../../../lib/LetsEncryptServer.js'
import { symbolOfErrorThrownByAsync } from '../../../lib/test-helpers/index.js'
import Pebble from '@small-tech/node-pebble'
import FinaliseOrderRequest from '../../../lib/acme-requests/FinaliseOrderRequest.js'
async function setup() {
// Run the tests using either a local Pebble server (default) or the Let’s Encrypt Staging server
// (which is subject to rate limits) if the STAGING environment variable is set.
......@@ -48,9 +50,6 @@ async function setup() {
return configuration
}
// import test from 'tape'
import FinaliseOrderRequest from '../../../lib/acme-requests/FinaliseOrderRequest.js'
// import { symbolOfErrorThrownByAsync } from '../../../lib/test-helpers/index.js'
test('Finalise Order Request', async t => {
const configuration = await setup()
......
import test from 'tape'
import NewAccountRequest from '../../../lib/acme-requests/NewAccountRequest.js'
import { symbolOfErrorThrownByAsync } from '../../../lib/test-helpers/index.js'
test('New Account Request', async t => {
t.pass('(no unit-specific tests)')
......
......@@ -2,7 +2,6 @@ import os from 'os'
import fs from 'fs-extra'
import path from 'path'
import test from 'tape'
import NewOrderRequest from '../../../lib/acme-requests/NewOrderRequest.js'
import Directory from '../../../lib/Directory.js'
import Account from '../../../lib/Account.js'
import AccountIdentity from '../../../lib/identities/AccountIdentity.js'
......@@ -12,6 +11,8 @@ import LetsEncryptServer from '../../../lib/LetsEncryptServer.js'
import { symbolOfErrorThrownByAsync } from '../../../lib/test-helpers/index.js'
import Pebble from '@small-tech/node-pebble'
import NewOrderRequest from '../../../lib/acme-requests/NewOrderRequest.js'
async function setup() {
// Run the tests using either a local Pebble server (default) or the Let’s Encrypt Staging server
// (which is subject to rate limits) if the STAGING environment variable is set.
......
......@@ -11,6 +11,8 @@ import LetsEncryptServer from '../../../lib/LetsEncryptServer.js'
import { symbolOfErrorThrownByAsync } from '../../../lib/test-helpers/index.js'
import Pebble from '@small-tech/node-pebble'
import ReadyForChallengeValidationRequest from '../../../lib/acme-requests/ReadyForChallengeValidationRequest.js'
async function setup() {
// Run the tests using either a local Pebble server (default) or the Let’s Encrypt Staging server
// (which is subject to rate limits) if the STAGING environment variable is set.
......@@ -49,10 +51,6 @@ async function setup() {
}
// import test from 'tape'
import ReadyForChallengeValidationRequest from '../../../lib/acme-requests/ReadyForChallengeValidationRequest.js'
// import { symbolOfErrorThrownByAsync } from '../../../lib/test-helpers/index.js'
test('Ready For Challenge Validation Request', async t => {
const configuration = await setup()
......
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