From a0558a09b79faee03ce505322daf8f7de1ab6048 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Tue, 21 Jun 2022 14:03:52 +0200 Subject: [PATCH 1/2] add resolver skylink download to critical checks --- src/checks/critical.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/checks/critical.js b/src/checks/critical.js index 28992b2..70d62be 100644 --- a/src/checks/critical.js +++ b/src/checks/critical.js @@ -9,6 +9,11 @@ const MODULE_BLOCKER = "b"; const skynetClient = new SkynetClient(`https://${process.env.PORTAL_DOMAIN}`); const exampleSkylink = "AACogzrAimYPG42tDOKhS3lXZD8YvlF8Q8R17afe95iV2Q"; +// this resolver skylink points to latest release of webportal-website and +// is updated automatically on each merged pull request via github-actions +// source: https://github.com/SkynetLabs/webportal-website +const exampleResolverSkylink = "AQCExZYFmmc75OPgjPpHuF4WVN0pc4FX2p09t4naLKfTLw"; + // check that any relevant configuration is properly set in skyd async function skydConfigCheck(done) { const time = process.hrtime(); @@ -69,12 +74,19 @@ async function websiteCheck(done) { } // downloadCheck returns the result of downloading the hard coded link -async function downloadCheck(done) { +async function downloadSkylinkCheck(done) { const url = await skynetClient.getSkylinkUrl(exampleSkylink); return done(await genericAccessCheck("skylink", url)); } +// downloadResolverSkylinkCheck returns the result of downloading an example resolver skylink +async function downloadResolverSkylinkCheck(done) { + const url = await skynetClient.getSkylinkUrl(exampleResolverSkylink); + + return done(await genericAccessCheck("resolver_skylink", url)); +} + // skylinkSubdomainCheck returns the result of downloading the hard coded link via subdomain async function skylinkSubdomainCheck(done) { const url = await skynetClient.getSkylinkUrl(exampleSkylink, { subdomain: true }); @@ -221,7 +233,8 @@ const checks = [ skydConfigCheck, uploadCheck, websiteCheck, - downloadCheck, + downloadSkylinkCheck, + downloadResolverSkylinkCheck, skylinkSubdomainCheck, handshakeSubdomainCheck, registryWriteAndReadCheck, From ed412ee06804ce6a0ba82d7caf53570b83ab97d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Wypch=C5=82o?= Date: Mon, 27 Jun 2022 12:38:23 +0200 Subject: [PATCH 2/2] Update test description Co-authored-by: Peter-Jan Brone --- src/checks/critical.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/checks/critical.js b/src/checks/critical.js index 70d62be..c307a39 100644 --- a/src/checks/critical.js +++ b/src/checks/critical.js @@ -73,7 +73,7 @@ async function websiteCheck(done) { return done(await genericAccessCheck("website", `https://${process.env.PORTAL_DOMAIN}`)); } -// downloadCheck returns the result of downloading the hard coded link +// downloadSkylinkCheck returns the result of downloading the hard coded link async function downloadSkylinkCheck(done) { const url = await skynetClient.getSkylinkUrl(exampleSkylink);