| | |
| | | |
| | | ### Run a self test |
| | | |
| | | Globus-ILIAS-Rest has a build-in testing tool to check if everything works correctly. |
| | | Globus-ILIAS-Rest has a build-in testing tool to check if everything works correctly and all components are accessible. |
| | | |
| | | Inside Globus-ILIAS-Rest dir run: |
| | | |
| | | npm run test-connect |
| | | |
| | | All tests must succeed without errors. |
| | | |
| | | |
| | | __Note__ |
| | | The tests for "the rest service" can only succeed when the rest service is running (see below). |
| | | |
| | | |
| | | |
| | |
| | | For accessing the service a auth-token is required. |
| | | This token is defined in the config file `settings.$NODE_ENV.json`. |
| | | |
| | | Dann kann der Service angesprochen werden (test mit curl): |
| | | Access REST API using curl: |
| | | |
| | | curl localhost:4101/users?token=AUTHTOKEN |
| | | curl localhost:4101/api/user?token=AUTHTOKEN |
| | | |
| | | Die Antwort prettyfeien: |
| | | Prettify the response: |
| | | |
| | | curl localhost:4101/users?token=AUTHTOKEN | jq . |
| | | curl localhost:4101/api/user?token=AUTHTOKEN | jq . |
| | | |
| | | |
| | | ### globusfm-dev2 |
| | | |
| | | Kann zugegriffen werden über |
| | | |
| | | https://globusfm-dev2.minervis.com/popcorn/users?token=$TOKEN |
| | | ## Manual testing |
| | | |
| | | Some example URLs for manual testing. |
| | | |
| | | ### Test for globusfm-dev2 |
| | | |
| | | Can be accessed by |
| | | |
| | | curl https://globusfm-dev2.minervis.com/popcorn/api/user?token=$TOKEN |
| | | curl https://globusfm-dev2.minervis.com/popcorn/api/user/userid/573?token=$TOKEN |
| | | |
| | | #### Testing PHP Component |
| | | |
| | | Folgende URL sollte dann funktionieren für die PHP Komponente: |
| | | https://globusfm-dev2.minervis.com/globus-ilias-rest/login.php?token=$PHPTOKEN&command=getUser&usr_id=573 |
| | | |
| | | Die API dann über: |
| | | https://globusfm-dev2.minervis.com/popcorn/api/user/userid/573?token=$TOKEN |
| | | |
| | | __Achtung__ die Tokens sind unterschiedlich! |
| | | |
| | | |
| | | ### Testing Apache |
| | | |
| | | https://globusfm-dev2.minervis.com/popcorn/users?token=AUTHTOKEN |
| | | curl https://globusfm-dev2.minervis.com/globus-ilias-rest/login.php?token=$ILIASTOKEN&command=getUser&usr_id=573 |
| | | |
| | | |
| | | |