make waitForDns async

cloudflare is partly broken
This commit is contained in:
Girish Ramakrishnan
2022-02-03 16:15:14 -08:00
parent da5b5aadbc
commit 0373fb70d5
20 changed files with 219 additions and 249 deletions
+10 -14
View File
@@ -29,9 +29,9 @@ function injectPrivateFields(newConfig, currentConfig) {
// in-place injection of tokens and api keys which came in with constants.SECRET_PLACEHOLDER
}
function upsert(domainObject, location, type, values, callback) {
function upsert(domainObject, subdomain, type, values, callback) {
assert.strictEqual(typeof domainObject, 'object');
assert.strictEqual(typeof location, 'string');
assert.strictEqual(typeof subdomain, 'string');
assert.strictEqual(typeof type, 'string');
assert(Array.isArray(values));
assert.strictEqual(typeof callback, 'function');
@@ -41,9 +41,9 @@ function upsert(domainObject, location, type, values, callback) {
callback(new BoxError(BoxError.NOT_IMPLEMENTED, 'upsert is not implemented'));
}
function get(domainObject, location, type, callback) {
function get(domainObject, subdomain, type, callback) {
assert.strictEqual(typeof domainObject, 'object');
assert.strictEqual(typeof location, 'string');
assert.strictEqual(typeof subdomain, 'string');
assert.strictEqual(typeof type, 'string');
assert.strictEqual(typeof callback, 'function');
@@ -52,9 +52,9 @@ function get(domainObject, location, type, callback) {
callback(new BoxError(BoxError.NOT_IMPLEMENTED, 'get is not implemented'));
}
function del(domainObject, location, type, values, callback) {
function del(domainObject, subdomain, type, values, callback) {
assert.strictEqual(typeof domainObject, 'object');
assert.strictEqual(typeof location, 'string');
assert.strictEqual(typeof subdomain, 'string');
assert.strictEqual(typeof type, 'string');
assert(Array.isArray(values));
assert.strictEqual(typeof callback, 'function');
@@ -64,22 +64,18 @@ function del(domainObject, location, type, values, callback) {
callback(new BoxError(BoxError.NOT_IMPLEMENTED, 'del is not implemented'));
}
function wait(domainObject, location, type, value, options, callback) {
async function wait(domainObject, subdomain, type, value, options) {
assert.strictEqual(typeof domainObject, 'object');
assert.strictEqual(typeof location, 'string');
assert.strictEqual(typeof subdomain, 'string');
assert.strictEqual(typeof type, 'string');
assert.strictEqual(typeof value, 'string');
assert(options && typeof options === 'object'); // { interval: 5000, times: 50000 }
assert.strictEqual(typeof callback, 'function');
callback();
}
function verifyDomainConfig(domainObject, callback) {
async function verifyDomainConfig(domainObject) {
assert.strictEqual(typeof domainObject, 'object');
assert.strictEqual(typeof callback, 'function');
// Result: domainConfig object
callback(new BoxError(BoxError.NOT_IMPLEMENTED, 'verifyDomainConfig is not implemented'));
throw new BoxError(BoxError.NOT_IMPLEMENTED, 'verifyDomainConfig is not implemented');
}