sysinfo: async'ify
in the process, provision, dyndns, mail, dns also got further asyncified
This commit is contained in:
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user