sysinfo: async'ify

in the process, provision, dyndns, mail, dns also got further asyncified
This commit is contained in:
Girish Ramakrishnan
2021-08-27 09:52:24 -07:00
parent 1856caf972
commit 51d067cbe3
26 changed files with 782 additions and 1082 deletions
+4 -3
View File
@@ -20,16 +20,17 @@ describe('Provision', function () {
after(cleanup);
async function waitForSetup() {
let response;
for (let times = 0; times < 5; ++times) {
const response = await superagent.get(`${serverUrl}/api/v1/cloudron/status`)
response = await superagent.get(`${serverUrl}/api/v1/cloudron/status`)
.ok(() => true);
if (response.statusCode === 200 && !response.body.setup.active && response.body.setup.errorMessage === '' && response.body.adminFqdn) return;
if (response.status === 200 && !response.body.setup.active && response.body.setup.errorMessage === '' && response.body.adminFqdn) return;
await delay(4000);
}
throw new Error('Setup did not complete');
throw new Error(`Setup did not complete. status: ${response.status} body: ${JSON.stringify(response.body)}`);
}
describe('DNS Setup', async function () {