Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

Create a test for broken links #175

Closed
mvaivre opened this issue Mar 23, 2022 · 8 comments · Fixed by #233
Closed

Create a test for broken links #175

mvaivre opened this issue Mar 23, 2022 · 8 comments · Fixed by #233
Assignees
Labels
feature New feature

Comments

@mvaivre
Copy link
Member

mvaivre commented Mar 23, 2022

Many links aren't working right now (https://wiki.alephium.org/Desktop-Wallet-Guide.html#utxo-consolidation https://wiki.alephium.org/Desktop-Wallet-Guide.html#creating-a-mining-wallet-with-4-addresses).

Let's add a test to catch any broken link?

@nop33
Copy link
Member

nop33 commented Mar 23, 2022

These are not working because we haven't published the wiki articles!

@nop33
Copy link
Member

nop33 commented Mar 23, 2022

alephium/docs#46

@lf94 lf94 self-assigned this May 4, 2022
@lf94
Copy link
Contributor

lf94 commented May 4, 2022

@lf94
Copy link
Contributor

lf94 commented May 4, 2022

Creating a test which relies on an external service isn't great; I suggest we just make sure the links are deployed already / near the same time. Otherwise the tests can one day just spontaneously fail due to network errors (unreachable, DNS resolution, etc).

@mvaivre
Copy link
Member Author

mvaivre commented May 5, 2022

IMO we will never be able to ensure that all the links are updated (and that a release is done) ahead of every article change (especially since other non-dev can be responsible for updating the wiki).
I prefer having a test fail rather than a dead link.
If a test fails and we realise that it's just a temporary issue, we can simply bypass the test. But it would force us to investigate.

@nop33
Copy link
Member

nop33 commented May 5, 2022

I think adding a test will become every easier when we start translating our content. We will then have to move all our content to json or yaml or md files. We can then tell a GitHub Actions script to always parse those files, look for links, and validate them. I guess the same can be done with ts files.

@lf94
Copy link
Contributor

lf94 commented May 5, 2022

Do we truly want to test all links to the Internet?

I can create a test that searches for links in our source code and test them all.

I'm thinking maybe the test can have a whitelist of domains which its allowed to test.

@mvaivre
Copy link
Member Author

mvaivre commented May 5, 2022

All links that are in our wallet - yes. Those will mostly point to our wiki / faq, but if they're in the UI, then it means that we've whitelisted them and we want them to work :)

@lf94 lf94 added the feature New feature label May 5, 2022
@lf94 lf94 changed the title Make sure to update wiki links (add a test for broken links) Create a test for broken links May 5, 2022
@lf94 lf94 closed this as completed in #233 May 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants