From e39eca4ed1f2f4e15851cf9789d240eda63150e0 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Mon, 8 Apr 2019 01:45:55 -0600 Subject: [PATCH] v3.0.1: add missing arguments --- example.js | 2 +- index.js | 15 ++++++++------- package.json | 6 +++--- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/example.js b/example.js index f00e6d0..5a5dd4a 100644 --- a/example.js +++ b/example.js @@ -1,6 +1,6 @@ 'use strict'; -//var tester = require('greenlock-challenge-test'); +//var tester = require('greenlock-store-test'); var tester = require('./'); var store = require('greenlock-store-memory').create({}); diff --git a/index.js b/index.js index d7c8e9d..4b30c3b 100644 --- a/index.js +++ b/index.js @@ -84,35 +84,36 @@ module.exports.test = function (store) { } }).then(function () { // TODO check accounts.check - var opts = { account: {}, email: email }; + var opts = { account: {}, email: email, subject: subject, certificate: {} }; return checkAccountKey(opts).then(function (results) { if (null !== results) { throw new Error("should not have an account keypair for " + subject); } }); }).then(function () { - var opts = { account: {}, email: email, keypair: accountKey }; + var opts = { account: {}, email: email, keypair: accountKey, subject: subject, certificate: {} }; return setAccountKey(opts).then(function (results) { if ('undefined' === typeof results) { throw new Error("should never get undefined as a return value, did you forget to return?"); } }); }).then(function () { - var opts = { certificate: {}, subject: subject, keypair: domainKey }; + var opts = { certificate: {}, subject: subject, keypair: domainKey, email: email, account: {} }; return setCertKey(opts).then(function (results) { if ('undefined' === typeof results) { throw new Error("should never get undefined as a return value, did you forget to return?"); } }); }).then(function () { - var opts = { certificate: {}, subject: subject, pems: domainCert }; + var opts = { certificate: {}, subject: subject, pems: domainCert, email: email, account: {} }; return setCert(opts).then(function (results) { if ('undefined' === typeof results) { throw new Error("should never get undefined as a return value, did you forget to return?"); } }); }).then(function () { - return checkCerts({ certificate: {}, subject: subject }).then(function (results) { + var opts = { certificate: {}, subject: subject, email: email, account: {} }; + return checkCerts(opts).then(function (results) { if (!results || !results.chain || !results.cert) { throw new Error("expected to get certificate and chain for " + subject); } @@ -149,7 +150,7 @@ module.exports.test = function (store) { } }); }).then(function () { - var opts = { certificate: {}, subject: subject }; + var opts = { certificate: {}, subject: subject, email: email, account: {} }; return checkCertKey(opts).then(function (results) { if (!results) { throw new Error("Should have found a keypair for " + opts.subject); @@ -172,7 +173,7 @@ module.exports.test = function (store) { } }); }).then(function () { - var opts = { account: {}, email: email }; + var opts = { account: {}, email: email, subject: subject, certificate: {} }; return checkAccountKey(opts).then(function (results) { if (!results) { throw new Error("Should have found a keypair for " + opts.email); diff --git a/package.json b/package.json index d6b5319..e29e2df 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "greenlock-store-test", - "version": "3.0.0", - "description": "The base set of tests for all certificate and keypair storage strategies. Any Greenlock `le-store-` plugin should be able to pass these tests.", + "version": "3.0.1", + "description": "The base set of tests for all certificate and keypair storage strategies. Any Greenlock `greenlock-store-` plugin should be able to pass these tests.", "main": "index.js", "files": ["example.js"], "dependencies": {}, @@ -13,7 +13,7 @@ }, "repository": { "type": "git", - "url": "https://git.coolaj86.com/coolaj86/le-store-test.js.git" + "url": "https://git.coolaj86.com/coolaj86/greenlock-store-test.js.git" }, "keywords": [ "Let's Encrypt",