docs icon indicating copy to clipboard operation
docs copied to clipboard

Document command to verify all available doc links

Open AlexAndBear opened this issue 4 years ago • 2 comments

WHAT Needs to be Documented?

With PR https://github.com/owncloud/core/pull/39026 a new command has been added make test-doc-links (not available via occ). This command checks if all doc-links provided in https://github.com/owncloud/core/pull/39026/files#diff-4392b98f2438a8b2698467bda6228bed8a258ec62c83a6fa15e97c0ad1781089 are reachable.

Examples given in PR

WHERE Does This Need To Be Documented (Link)?

Would love to have a new section here: https://doc.owncloud.com/server/10.8/developer_manual/testing/

WHY Should This Change Be Made?

(Optional) What Type Of Content Change Is This?

  • [x] New Content Addition
  • [ ] Old Content Deprecation
  • [ ] Existing Content Simplification
  • [ ] Bug Fix to Existing Content

(Optional) Which Manual Does This Relate To?

  • [ ] Admin Manual
  • [x] Developer Manual
  • [ ] User Manual
  • [ ] Android
  • [ ] iOS
  • [ ] Branded Clients
  • [ ] Desktop Client
  • [ ] Other

AlexAndBear avatar Jul 28 '21 05:07 AlexAndBear

A naive use of this command from a git checkout fails:

$ make test-doc-links DOC_LINK_VERSION="10.9"
php tests/docs/DocLinksTest.php 10.9
{"reqId":"buSofOFDUfeaKS32wA7m","level":3,"time":"2021-12-09T01:30:45+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Exception: Not installed at \/home\/testy\/src\/github\/owncloud\/core\/lib\/base.php#280"}
$ make install
make: *** No rule to make target 'install'.  Stop.

Please also document proper preconditions. My hacky way of doing this:

  • install 10.9.0-beta-complete tar normally into /var/www/owncloud
  • add Makefile and 17MB of tests/* code from github.
root@jw-fed1-htz:/var/www/owncloud# make test-doc-links DOC_LINK_VERSION="10.9"
php tests/docs/DocLinksTest.php 10.9
Doclink for 'admin-email' failed with status code 404: https://doc.owncloud.com/server/10.9/go.php?to=admin-email
Doclink for 'admin-backup' failed with status code 404: https://doc.owncloud.com/server/10.9/go.php?to=admin-backup
Doclink for 'admin-config' failed with status code 404: https://doc.owncloud.com/server/10.9/go.php?to=admin-config
Doclink for 'admin-sharing' failed with status code 404: https://doc.owncloud.com/server/10.9/go.php?to=admin-sharing
Doclink for 'admin-php-fpm' failed with status code 404: https://doc.owncloud.com/server/10.9/go.php?to=admin-php-fpm
Doclink for 'admin-install' failed with status code 404: https://doc.owncloud.com/server/10.9/go.php?to=admin-install
Doclink for 'admin-security' failed with status code 404: https://doc.owncloud.com/server/10.9/go.php?to=admin-security
Doclink for 'admin-logfiles' failed with status code 404: https://doc.owncloud.com/server/10.9/go.php?to=admin-logfiles
Doclink for 'admin-encryption' failed with status code 404: https://doc.owncloud.com/server/10.9/go.php?to=admin-encryption
Doclink for 'admin-performance' failed with status code 404: https://doc.owncloud.com/server/10.9/go.php?to=admin-performance
Doclink for 'admin-cli-upgrade' failed with status code 404: https://doc.owncloud.com/server/10.9/go.php?to=admin-cli-upgrade
Doclink for 'admin-db-conversion' failed with status code 404: https://doc.owncloud.com/server/10.9/go.php?to=admin-db-conversion
Doclink for 'admin-source_install' failed with status code 404: https://doc.owncloud.com/server/10.9/go.php?to=admin-source_install
Doclink for 'admin-background-jobs' failed with status code 404: https://doc.owncloud.com/server/10.9/go.php?to=admin-background-jobs
Doclink for 'admin-untrusted-domain' failed with status code 404: https://doc.owncloud.com/server/10.9/go.php?to=admin-untrusted-domain
Doclink for 'admin-sharing-federated' failed with status code 404: https://doc.owncloud.com/server/10.9/go.php?to=admin-sharing-federated
Doclink for 'admin-transactional-locking' failed with status code 404: https://doc.owncloud.com/server/10.9/go.php?to=admin-transactional-locking
Doclink for 'user-webdav' failed with status code 404: https://doc.owncloud.com/server/10.9/go.php?to=user-webdav
Doclink for 'developer-theming' failed with status code 404: https://doc.owncloud.com/server/10.9/go.php?to=developer-theming

root@jw-fed1-htz:/var/www/owncloud# make test-doc-links DOC_LINK_VERSION="10.8"
php tests/docs/DocLinksTest.php 10.8
All doclinks are valid!

jnweiger avatar Dec 09 '21 01:12 jnweiger

This must fail atm: failed with status code 404: https://doc.owncloud.com/server/10.9/go.php? Because it references 10.9 in the doc link but 10.9 is not available on the web, only in the docs repo. We are waiting for the go of @pmaier1 to press the docs button for 10.9 (see PR), then a true result will be visible when re-running.

mmattel avatar Dec 09 '21 10:12 mmattel