-
Sub-task
-
Resolution: Fixed
-
Neutral
-
None
Use RestAssured or similar to check whether the 3rd-party-APIs give "reasonable" response. This actually should be better tested on the module itself (vs. the services-demo instance used for UI tests) - but the module itself may not have the ready setup.
Repository: https://git.magnolia-cms.com/projects/EXTENSIONS/repos/openai-integrations/browse
Some configuration: https://author.integration-tests-62.eu-playground.magnolia-platform.com/.magnolia/admincentral#app:resources:view;/openai-automations/restClients/openAI.yaml:edit
How to authenticate?
- write a setup in the repository itself, but we need credentials for OpenAI / Azure
- create our own using a free plan? So we don't suffer from Services rotating credentials for instance.
- use the services-demo instance's credentials by running tests against it directly?
What do we want to test?
- which APIs to call?
- test both ChatGTP & Azure
- what would be a "reasonable" response?
- HTTP code 200
- maybe some bits of JSON?
Implemented tests
In the test we have verified that the connection to AIs is successful (200 HTTP code, and a response in JSON), the connections made are:
- Connection via restclient to ChatGPT
- Connection via http to ChatGPT
- Connection via restclient to Azure
- Connection via http to Azure